[patch net-next V6 09/15] qlcnic: guard __vlan_find_dev_deep() by rcu_read_lock

From: Jiri Pirko
Date: Fri Jan 04 2013 - 03:49:46 EST


rcu_read_lock was missing here

Signed-off-by: Jiri Pirko <jiri@xxxxxxxxxxx>
Acked-by: Sony Chacko <sony.chacko@xxxxxxxxxx>
---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
index 137ca13..3655ca2 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
@@ -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,
--
1.8.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/