qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock
authorJiri Pirko <jiri@resnulli.us>
Thu, 3 Jan 2013 22:48:57 +0000 (22:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Jan 2013 21:31:50 +0000 (13:31 -0800)
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>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c

index 137ca13710afe6d73ac14a38b2f9e15b6c23e64b..3655ca2de525960e0291fd130e0c718f7d314d08 100644 (file)
@@ -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,