Skip to content

Commit

Permalink
qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock
Browse files Browse the repository at this point in the history
rcu_read_lock was missing here

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jan 4, 2013
1 parent 2eea05b commit 43c00a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3186,12 +3186,14 @@ void qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)

qlcnic_config_indev_addr(adapter, netdev, event);

rcu_read_lock();
for_each_set_bit(vid, adapter->vlans, VLAN_N_VID) {
dev = __vlan_find_dev_deep(netdev, vid);
if (!dev)
continue;
qlcnic_config_indev_addr(adapter, dev, event);
}
rcu_read_unlock();
}

static int qlcnic_netdev_event(struct notifier_block *this,
Expand Down

0 comments on commit 43c00a7

Please sign in to comment.