hv_netvsc: Fix race between VF offering and VF association message from host
authorGaurav Kohli <gauravkohli@linux.microsoft.com>
Thu, 6 Oct 2022 05:52:59 +0000 (22:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:18 +0000 (12:34 +0200)
commit15993e9a9b12487192cbf7eebf838676e05895d5
treead86f88e116ec10d5e133ed76a1a44c9294a6bcc
parentf9dc33f231531f0e3ae6c0d7c9977b729d9291bd
hv_netvsc: Fix race between VF offering and VF association message from host

commit 365e1ececb2905f94cc10a5817c5b644a32a3ae2 upstream.

During vm boot, there might be possibility that vf registration
call comes before the vf association from host to vm.

And this might break netvsc vf path, To prevent the same block
vf registration until vf bind message comes from host.

Cc: stable@vger.kernel.org
Fixes: 00d7ddba11436 ("hv_netvsc: pair VF based on serial number")
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Gaurav Kohli <gauravkohli@linux.microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c