hv_netvsc: use RCU to fix concurrent rx and queue changes
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 14 May 2018 22:32:16 +0000 (15:32 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 May 2018 14:17:29 +0000 (16:17 +0200)
commit9c6439c7b1689f27c0c6957391da22343425ca18
tree0a807bb2b408d3a3cbf4bdb3ef1f2ba4052fbc39
parent1f3ef8a7a3c667f72bcb20be61ec4b4214f355b2
hv_netvsc: use RCU to fix concurrent rx and queue changes

[ Commit 02400fcee2542ee334a2394e0d9f6efd969fe782 upstream. ]

The receive processing may continue to happen while the
internal network device state is in RCU grace period.
The internal RNDIS structure is associated with the
internal netvsc_device structure; both have the same
RCU lifetime.

Defer freeing all associated parts until after grace
period.

Fixes: 0cf737808ae7 ("hv_netvsc: netvsc_teardown_gpadl() split")
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
drivers/net/hyperv/rndis_filter.c