Linux-HyperV Archive on lore.kernel.org
 help / color / Atom feed
From: David Miller <davem@davemloft.net>
To: haiyangz@microsoft.com
Cc: sashal@kernel.org, linux-hyperv@vger.kernel.org,
	netdev@vger.kernel.org, kys@microsoft.com,
	sthemmin@microsoft.com, olaf@aepfle.de, vkuznets@redhat.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] hv_netvsc: Fix XDP refcnt for synthetic and VF NICs
Date: Fri, 07 Feb 2020 11:34:13 +0100 (CET)
Message-ID: <20200207.113413.1857068725421133796.davem@davemloft.net> (raw)
In-Reply-To: <1581026465-36161-1-git-send-email-haiyangz@microsoft.com>

From: Haiyang Zhang <haiyangz@microsoft.com>
Date: Thu,  6 Feb 2020 14:01:05 -0800

> The caller of XDP_SETUP_PROG has already incremented refcnt in
> __bpf_prog_get(), so drivers should only increment refcnt by
> num_queues - 1.
> 
> To fix the issue, update netvsc_xdp_set() to add the correct number
> to refcnt.
> 
> Hold a refcnt in netvsc_xdp_set()’s other caller, netvsc_attach().
> 
> And, do the same in netvsc_vf_setxdp(). Otherwise, every time when VF is
> removed and added from the host side, the refcnt will be decreased by one,
> which may cause page fault when unloading xdp program.
> 
> Fixes: 351e1581395f ("hv_netvsc: Add XDP support")
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

Applied, thank you.

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 22:01 Haiyang Zhang
2020-02-07 10:34 ` David Miller [this message]

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200207.113413.1857068725421133796.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    --cc=sashal@kernel.org \
    --cc=sthemmin@microsoft.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-HyperV Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-hyperv/0 linux-hyperv/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-hyperv linux-hyperv/ https://lore.kernel.org/linux-hyperv \
		linux-hyperv@vger.kernel.org
	public-inbox-index linux-hyperv

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-hyperv


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git