hv_netvsc: fix locking for rx_mode
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 7 Mar 2018 21:49:11 +0000 (13:49 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:13 +0000 (07:52 +0200)
commitb37bc05f44c6b4b7cb25583f8c5c85b81d6eb9e0
tree9876f2cc2da1d9b8f312b015c518590b4f55af89
parent9241c4f472054a46605d0a820e3b93fa59c23406
hv_netvsc: fix locking for rx_mode

[ Upstream commit 35a57b7fef136fa3d5b735ba773f191b95110fa0 ]

The rx_mode operation handler is different than other callbacks
in that is not always called with rtnl held. Therefore use
RCU to ensure that references are valid.

Fixes: bee9d41b37ea ("hv_netvsc: propagate rx filters to VF")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c