> -----Original Message----- > From: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx> > Sent: Thursday, February 1, 2024 11:41 PM > To: KY Srinivasan <kys@xxxxxxxxxxxxx>; Haiyang Zhang > <haiyangz@xxxxxxxxxxxxx>; Wei Liu <wei.liu@xxxxxxxxxx>; Dexuan Cui > <decui@xxxxxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>; Eric > Dumazet <edumazet@xxxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo > Abeni <pabeni@xxxxxxxxxx>; Wojciech Drewek <wojciech.drewek@xxxxxxxxx>; > linux-hyperv@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux- > kernel@xxxxxxxxxxxxxxx > Cc: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx>; Shradha Gupta > <shradhagupta@xxxxxxxxxxxxx>; stable@xxxxxxxxxxxxxxx > Subject: [PATCH net,v2] hv_netvsc: Register VF in netvsc_probe if > NET_DEVICE_REGISTER missed > > 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@xxxxxxxxxxxxxxx > Fixes: 85520856466e ("hv_netvsc: Fix race of register_netdevice_notifier > and VF register") > Suggested-by: Dexuan Cui <decui@xxxxxxxxxxxxx> > Signed-off-by: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx> Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>