summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorGaurav Kohli <gauravkohli@linux.microsoft.com>2022-10-06 07:52:59 +0200
committerDavid S. Miller <davem@davemloft.net>2022-10-07 09:43:58 +0200
commit365e1ececb2905f94cc10a5817c5b644a32a3ae2 (patch)
tree7b397b41e30b0e5d4a9c6323acbb192552caf08c /drivers/net/hyperv/hyperv_net.h
parentnet: ieee802154: return -EINVAL for unknown addr type (diff)
downloadlinux-365e1ececb2905f94cc10a5817c5b644a32a3ae2.tar.xz
linux-365e1ececb2905f94cc10a5817c5b644a32a3ae2.zip
hv_netvsc: Fix race between VF offering and VF association message from host
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>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 25b38a374e3c..dd5919ec408b 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -1051,7 +1051,8 @@ struct net_device_context {
u32 vf_alloc;
/* Serial number of the VF to team with */
u32 vf_serial;
-
+ /* completion variable to confirm vf association */
+ struct completion vf_add;
/* Is the current data path through the VF NIC? */
bool data_path_is_vf;