Linux-HyperV Archive on
 help / color / Atom feed
From: David Miller <>
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: <> (raw)
In-Reply-To: <>

From: Haiyang Zhang <>
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 <>

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

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

Linux-HyperV Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index linux-hyperv

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone