2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/net/hyperv
Dipayaan Roy 9448ccd853 net: hv_netvsc: fix loss of early receive events from host during channel open.
The hv_netvsc driver currently enables NAPI after opening the primary and
subchannels. This ordering creates a race: if the Hyper-V host places data
in the host -> guest ring buffer and signals the channel before
napi_enable() has been called, the channel callback will run but
napi_schedule_prep() will return false. As a result, the NAPI poller never
gets scheduled, the data in the ring buffer is not consumed, and the
receive queue may remain permanently stuck until another interrupt happens
to arrive.

Fix this by enabling NAPI and registering it with the RX/TX queues before
vmbus channel is opened. This guarantees that any early host signal after
open will correctly trigger NAPI scheduling and the ring buffer will be
drained.

Fixes: 76bb5db5c7 ("netvsc: fix use after free on module removal")
Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Link: https://patch.msgid.link/20250825115627.GA32189@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-08-26 18:15:19 -07:00
..
hyperv_net.h hv_netvsc: Fix panic during namespace deletion with VF 2025-08-08 13:24:16 -07:00
Kconfig hv_netvsc: rndis_filter needs to select NLS 2023-12-01 20:12:24 -08:00
Makefile hv_netvsc: Add XDP support 2020-01-25 10:43:19 +01:00
netvsc_bpf.c hv_netvsc: fix potential deadlock in netvsc_vf_setxdp() 2025-05-30 19:31:25 -07:00
netvsc_drv.c hv_netvsc: Fix panic during namespace deletion with VF 2025-08-08 13:24:16 -07:00
netvsc_trace.c
netvsc_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
netvsc.c net: hv_netvsc: fix loss of early receive events from host during channel open. 2025-08-26 18:15:19 -07:00
rndis_filter.c net: hv_netvsc: fix loss of early receive events from host during channel open. 2025-08-26 18:15:19 -07:00