hv_netvsc: avoid retry on send during shutdown
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 14 May 2018 22:32:09 +0000 (15:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:27 +0000 (16:17 +0200)
commit0395570f81feeebbf0f390876c8ca763b6ce773c
tree5d56fc3deb1a1dff9617866b78696873a27a35cf
parent36a9609cef4a32a1cfd9b8c765671f11caf03a7d
hv_netvsc: avoid retry on send during shutdown

[ Commit 12f69661a49446840d742d8feb593ace022d9f66 upstream. ]

Change the initialization order so that the device is ready to transmit
(ie connect vsp is completed) before setting the internal reference
to the device with RCU.

This avoids any races on initialization and prevents retry issues
on shutdown.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc.c