summaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
authorBui Quang Minh <minhquangbui99@gmail.com>2025-04-17 14:28:03 +0700
committerJakub Kicinski <kuba@kernel.org>2025-04-22 18:29:13 -0700
commit4bc12818b363bd30f0f7348dd9ab077290a637ae (patch)
treef8aa194c91aeeb6455495d5908fda4977784965e /scripts/gdb/linux/proc.py
parentb7f0ee992adf601aa00c252418266177eb7ac2bc (diff)
downloadlinux-stable-4bc12818b363bd30f0f7348dd9ab077290a637ae.tar.gz
linux-stable-4bc12818b363bd30f0f7348dd9ab077290a637ae.tar.bz2
linux-stable-4bc12818b363bd30f0f7348dd9ab077290a637ae.zip
virtio-net: disable delayed refill when pausing rx
When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call napi_disable() on the receive queue's napi. In delayed refill_work, it also calls napi_disable() on the receive queue's napi. When napi_disable() is called on an already disabled napi, it will sleep in napi_disable_locked while still holding the netdev_lock. As a result, later napi_enable gets stuck too as it cannot acquire the netdev_lock. This leads to refill_work and the pause-then-resume tx are stuck altogether. This scenario can be reproducible by binding a XDP socket to virtio-net interface without setting up the fill ring. As a result, try_fill_recv will fail until the fill ring is set up and refill_work is scheduled. This commit adds virtnet_rx_(pause/resume)_all helpers and fixes up the virtnet_rx_resume to disable future and cancel all inflights delayed refill_work before calling napi_disable() to pause the rx. Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://patch.msgid.link/20250417072806.18660-2-minhquangbui99@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions