Skip to content
Snippets Groups Projects
Commit 5b10a88f authored by Shradha Gupta's avatar Shradha Gupta Committed by Sasha Levin
Browse files

hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed


[ Upstream commit 9cae43da ]

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: 85520856 ("hv_netvsc: Fix race of register_netdevice_notifier and VF register")
Suggested-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarShradha Gupta <shradhagupta@linux.microsoft.com>
Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: default avatarDexuan Cui <decui@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 8f41b33d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment