Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp2179673pja; Thu, 26 Mar 2020 10:57:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvWi+TsOfWlNioi6RHomTji/owt6tmbtRRYPxSztlmOIXrd4nTOR90HrYjYkETET3XFJihg X-Received: by 2002:a9d:4698:: with SMTP id z24mr7133024ote.271.1585245439437; Thu, 26 Mar 2020 10:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585245439; cv=none; d=google.com; s=arc-20160816; b=uZy6IlGxQOMWYudeD+ahqIcJTgxgILOypVy9/5G0x4OTBKYilCK/JtEMaHYlRWDBYA MhRBgciWtn2EmWJm1UaCFn25XJreEWbHVWss8xMgE0aZ4FM18/PkOeN5Hb0uSKKZ/1me jnGvLiAKGH9YmhIlVPodnLrvlBrhcW7XFZIrc/OVxwq0wQRKMJiTvYju9U5v9W6QFeYO IdOCbQUvVn/Jncfv05UTB8vOt1Efj7WTRo9r9Q8RLiIAG8dUoke3oLcjE6omHXpGL+0J bpRF9QIVVL1E5vYrpgB1wznvG7T6aPT4Z2OscC92LnQnNAoUsyrqAOmwZMvHq/5o2Ncm dDoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=8l2oRnDlBMb0gXsLvGjz4aRGCAhqoB1hZgrGjPsa2To=; b=gPX2RziXysiKe/xVZO6alNlZHgYXZXZUSF0pGxhO9YnllXQh2dDHoBS8E+IkmH3X/y 8KcmG+HmA3aGZPmRtBTXK7/ySInHr03ZsgC+nMZl08YA489JaiWdovp9t6fUtKxl4mgX nlEKixhcHNxsnUWYtNrGzOJGxIpLwiF1/7Zg9JxkYQfvK5CMdQRG21fOLHZVmTmapMNQ FAI2PISvfyJIcwmYrvgBFwj5s49QPlXM1+F3MrxLu+6Mw0tbzYxYJSJbw1NpPFYVsxCd nELWnSL/un01/aL60uHJ1vxby3epIemO0OILKjvVIWDYgBD3sobxkQwTC/tjzpbhZUW+ 1YNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RhQmfK7z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i187si1323548oif.89.2020.03.26.10.57.05; Thu, 26 Mar 2020 10:57:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RhQmfK7z; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728148AbgCZRzp (ORCPT + 99 others); Thu, 26 Mar 2020 13:55:45 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:54377 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbgCZRzp (ORCPT ); Thu, 26 Mar 2020 13:55:45 -0400 Received: by mail-wm1-f67.google.com with SMTP id c81so7494480wmd.4; Thu, 26 Mar 2020 10:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8l2oRnDlBMb0gXsLvGjz4aRGCAhqoB1hZgrGjPsa2To=; b=RhQmfK7zxsQz9efFQMf3Mgar0VVI4KEnYZVN24ZrLsHIMhWb+dRvc8+mZqQmF1LwqO DpYAPanXRGJSF+ymGAJZAyu+H1jY+mVs1Ste/CgMEux+jM8JmvEikda59HDUR8CVpYTy q2J9IQh2HJAGqgxWU1EVZ+CRu1rMtU3TiNFOdjeDfwuqMYY+JebAU3yd+x2APX8aeGwK Kn0jY19MNPeLE3h9aLAxZMYOHZMBwUMSOJq9q3lDooQtyaQ5VxqCFHwGwjFEn/IO7WRM qPJgDo5buaIoEj4MUshrYNO2xbk469eB83cRM35NUwBLbzT0t6iA6lx41Z7XBjuFdNGI Ymqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8l2oRnDlBMb0gXsLvGjz4aRGCAhqoB1hZgrGjPsa2To=; b=JEO64nfeATFcSLk2q5aIk/QGRyKqobSuF3J29u/H5vQ+OQjye2ra6jCIyoDDcNBFLJ JKtAjTMOJj2JfgCIuXlmeAdnhXq1aflptYACJ7x4LlDX4pkBb/GJKQssmFfaOZjsn6Fb 3powiKcS7gb1SSF8ic0A4XJen+O4cENKFCQ/3W3EloLQ9CMHUBGSSpdtzllvOlQM+8Qr X7r/7PUuaQE+84xbM40XzX7Ywe0lZm1AD/x4hcB0bMqmHfih2rbasDVwwUQiSHo4L+RW Jbg+zp1i4qPtHLNXt0XRv9Vj0PdDvJXjRDZfOz8+d4d9OC17YHHveRdG2Wvc53u0+pd7 857Q== X-Gm-Message-State: ANhLgQ3kS6DJXvqIIzU9kPQWAckQDJYfqhrtoHvwAnM2CY1xD0+gfKnH I3449745MP1fnJL3xcOw9i4= X-Received: by 2002:a7b:c1da:: with SMTP id a26mr1177478wmj.91.1585245342367; Thu, 26 Mar 2020 10:55:42 -0700 (PDT) Received: from andrea ([86.61.236.197]) by smtp.gmail.com with ESMTPSA id w9sm5014104wrk.18.2020.03.26.10.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 10:55:41 -0700 (PDT) Date: Thu, 26 Mar 2020 18:55:31 +0100 From: Andrea Parri To: Stephen Hemminger Cc: linux-kernel@vger.kernel.org, "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , linux-hyperv@vger.kernel.org, Michael Kelley , Dexuan Cui , Boqun Feng , Vitaly Kuznetsov , "David S. Miller" , netdev@vger.kernel.org Subject: Re: [RFC PATCH 04/11] hv_netvsc: Disable NAPI before closing the VMBus channel Message-ID: <20200326175531.GA20523@andrea> References: <20200325225505.23998-1-parri.andrea@gmail.com> <20200325225505.23998-5-parri.andrea@gmail.com> <20200326082636.1d777921@hermes.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200326082636.1d777921@hermes.lan> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 26, 2020 at 08:26:36AM -0700, Stephen Hemminger wrote: > On Wed, 25 Mar 2020 23:54:58 +0100 > "Andrea Parri (Microsoft)" wrote: > > > vmbus_chan_sched() might call the netvsc driver callback function that > > ends up scheduling NAPI work. This "work" can access the channel ring > > buffer, so we must ensure that any such work is completed and that the > > ring buffer is no longer being accessed before freeing the ring buffer > > data structure in the channel closure path. To this end, disable NAPI > > before calling vmbus_close() in netvsc_device_remove(). > > > > Suggested-by: Michael Kelley > > Signed-off-by: Andrea Parri (Microsoft) > > Cc: "David S. Miller" > > Cc: > > Do you have a test that reproduces this issue? I don't (or I'm not aware of such a test). > > The netvsc device is somewhat unique in that it needs NAPI > enabled on the primary channel to interact with the host. > Therefore it can't call napi_disable in the normal dev->stop() place. > > Acked-by: Stephen Hemminger Thanks! Andrea