OpenCloudOS-Kernel/drivers/net/hyperv
Shradha Gupta a71302c863 hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed
commit 9cae43da9867412f8bd09aee5c8a8dc5e8dc3dc2 upstream.

If hv_netvsc driver is unloaded and reloaded, the NET_DEVICE_REGISTER
handler cannot perform VF register successfully as the register call
is received before netvsc_probe is finished. This is because we
register register_netdevice_notifier() very early( even before
vmbus_driver_register()).
To fix this, we try to register each such matching VF( if it is visible
as a netdevice) at the end of netvsc_probe.

Cc: stable@vger.kernel.org
Fixes: 85520856466e ("hv_netvsc: Fix race of register_netdevice_notifier and VF register")
Suggested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:25:16 +01:00
..
Kconfig hv_netvsc: rndis_filter needs to select NLS 2023-12-13 18:45:04 +01:00
Makefile hv_netvsc: Add XDP support 2020-01-25 10:43:19 +01:00
hyperv_net.h eth: add missing xdp.h includes in drivers 2023-08-03 08:38:07 -07:00
netvsc.c hv_netvsc: Fix race condition between netvsc_probe and netvsc_remove 2024-02-23 09:25:08 +01:00
netvsc_bpf.c hv_netvsc: Add support for XDP_REDIRECT 2022-04-11 18:25:47 -07:00
netvsc_drv.c hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed 2024-02-23 09:25:16 +01:00
netvsc_trace.c
netvsc_trace.h
rndis_filter.c hv_netvsc: Allocate rx indirection table size dynamically 2023-06-07 09:46:49 +01:00