diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-10-09 21:53:17 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-10-09 21:53:17 +0400 |
commit | 52cf39eb4ed0aef1169244338f5c498b592b4fcc (patch) | |
tree | 64e003845147431df77719f2aebdd69fda407600 | |
parent | a339d8cbf17b5c4b1aaaa0d68550fb333bf779f7 (diff) | |
download | accel-ppp-52cf39eb4ed0aef1169244338f5c498b592b4fcc.tar.gz accel-ppp-52cf39eb4ed0aef1169244338f5c498b592b4fcc.zip |
ipoe: driver: add rtnl locking to vlan monitor initialization
-rw-r--r-- | drivers/ipoe/ipoe.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index cee7edb..2d05f42 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -1802,17 +1802,21 @@ static int ipoe_nl_cmd_add_vlan_mon(struct sk_buff *skb, struct genl_info *info) #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) if (dev->features & NETIF_F_HW_VLAN_FILTER) { + rtnl_lock(); for (i = 1; i < 4096; i++) { if (!(d->vid[i / (8*sizeof(long))] & (1lu << (i % (8*sizeof(long)))))) dev->netdev_ops->ndo_vlan_rx_add_vid(dev, i); } + rtnl_unlock(); } #else if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER) { + rtnl_lock(); for (i = 1; i < 4096; i++) { if (!(d->vid[i / (8*sizeof(long))] & (1lu << (i % (8*sizeof(long)))))) dev->netdev_ops->ndo_vlan_rx_add_vid(dev, htons(ETH_P_8021Q), i); } + rtnl_unlock(); } #endif } |