mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
hv_netvsc: fix locking during VF setup
The dev_uc/mc_sync calls need to have the device address list
locked. This was spotted by running with lockdep enabled.
Fixes: bee9d41b37
("hv_netvsc: propagate rx filters to VF")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
35a57b7fef
commit
b0dee79103
@ -1851,8 +1851,12 @@ static void __netvsc_vf_setup(struct net_device *ndev,
|
||||
|
||||
/* set multicast etc flags on VF */
|
||||
dev_change_flags(vf_netdev, ndev->flags | IFF_SLAVE);
|
||||
|
||||
/* sync address list from ndev to VF */
|
||||
netif_addr_lock_bh(ndev);
|
||||
dev_uc_sync(vf_netdev, ndev);
|
||||
dev_mc_sync(vf_netdev, ndev);
|
||||
netif_addr_unlock_bh(ndev);
|
||||
|
||||
if (netif_running(ndev)) {
|
||||
ret = dev_open(vf_netdev);
|
||||
|
Loading…
Reference in New Issue
Block a user