]> git.ipfire.org Git - thirdparty/linux.git/commit
virtio-net: don't schedule delayed refill worker
authorBui Quang Minh <minhquangbui99@gmail.com>
Tue, 6 Jan 2026 15:04:36 +0000 (22:04 +0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Jan 2026 19:12:48 +0000 (11:12 -0800)
commitfcdef3bcbb2c04e06ae89f8faff2cd6416b3a467
tree475de1ea7e073a1e930306b749e7b65e3434268b
parent7470a7a63dc162f07c26dbf960e41ee1e248d80e
virtio-net: don't schedule delayed refill worker

When we fail to refill the receive buffers, we schedule a delayed worker
to retry later. However, this worker creates some concurrency issues.
For example, when the worker runs concurrently with virtnet_xdp_set,
both need to temporarily disable queue's NAPI before enabling again.
Without proper synchronization, a deadlock can happen when
napi_disable() is called on an already disabled NAPI. That
napi_disable() call will be stuck and so will the subsequent
napi_enable() call.

To simplify the logic and avoid further problems, we will instead retry
refilling in the next NAPI poll.

Fixes: 4bc12818b363 ("virtio-net: disable delayed refill when pausing rx")
Reported-by: Paolo Abeni <pabeni@redhat.com>
Closes: https://lore.kernel.org/526b5396-459d-4d02-8635-a222d07b46d7@redhat.com
Cc: stable@vger.kernel.org
Suggested-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/20260106150438.7425-2-minhquangbui99@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c