Linux virtualization list
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Haishuang Yan" <yanhaishuang@cmss.chinamobile.com>
Cc: virtualization@lists.linux.dev,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Eugenio Perez" <eperezma@redhat.com>
Subject: Re: [PATCH net] net: update RX queue kobjects during device unregistration
Date: Sun, 29 Nov 2026 02:57:56 +0000	[thread overview]
Message-ID: <sashiko-outbox-239278@kernel.org> (raw)
In-Reply-To: <20261129024754.9593-1-yanhaishuang@cmss.chinamobile.com>

> When unregister_netdevice_many_notify() sets NETREG_UNREGISTERING and
> calls dev_xdp_uninstall(), a driver that shrinks real_num_rx_queues
> (such as virtio_net) hits netif_set_real_num_rx_queues(). Because it
> only checks NETREG_REGISTERED, it skips net_rx_queue_update_kobjects()
> while still lowering dev->real_num_rx_queues. remove_queue_kobjects()
> then leaks the extra RX queue kobjects and their netdev references,
> hanging unregister with "waiting for eth0 to become free. Usage count
> = 2".
> 
> Update RX queue kobjects under NETREG_UNREGISTERING too, matching
> netif_set_real_num_tx_queues() from
> commit 5c56580b74e5 ("net: Adjust TX queue kobjects if number of queues
> changes during unregister").
> 
> Found and verified by unbinding virtio_net with XDP attached in an
> x86_64 KVM guest (KASAN + NET_DEV_REFCNT_TRACKER).
> 
> Fixes: bd0b2e7fe611 ("net: xdp: make the stack take care of the tear down")
> Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261129024754.9593-1-yanhaishuang@cmss.chinamobile.com?part=1

      reply	other threads:[~2026-11-29  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-29  2:47 [PATCH net] net: update RX queue kobjects during device unregistration Haishuang Yan
2026-11-29  2:57 ` sashiko-bot [this message]

Reply instructions:

You may reply publicly 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=sashiko-outbox-239278@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=eperezma@redhat.com \
    --cc=mst@redhat.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=virtualization@lists.linux.dev \
    --cc=yanhaishuang@cmss.chinamobile.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox