netvsc: handle select_queue when device is being removed
authorstephen hemminger <stephen@networkplumber.org>
Thu, 9 Mar 2017 22:58:29 +0000 (14:58 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Mar 2017 06:13:41 +0000 (23:13 -0700)
commit7ce101246655935b014b11d81f815342921f5654
tree3f3e433183069f6c8f6fe40557d6db1e5d4424ee
parentecd052250b51c8cee4d9720adea05690dfc77c64
netvsc: handle select_queue when device is being removed

Move the send indirection table from the inner device (netvsc)
to the network device context.

It is possible that netvsc_device is not present (remove in progress).
This solves potential use after free issues when packet is being
created during MTU change, shutdown, or queue count changes.

Fixes: d8e18ee0fa96 ("netvsc: enhance transmit select_queue")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc.c
drivers/net/hyperv/netvsc_drv.c