summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2015-02-27 21:35:58 +0300
committerDmitry Kozlov <xeb@mail.ru>2015-02-27 21:35:58 +0300
commita803c38139fc3e2bb218ea73afa00df9b33cbc14 (patch)
tree310d065840b6918206c3049bd9fbdd6c69285780
parent408a04d008ffe0c99c60ca6603c8369cd999b844 (diff)
downloadaccel-ppp-a803c38139fc3e2bb218ea73afa00df9b33cbc14.tar.gz
accel-ppp-a803c38139fc3e2bb218ea73afa00df9b33cbc14.zip
ipoe: driver: wrap vla_add_vid by rtnl_lock/rtnl_unlock
-rw-r--r--drivers/ipoe/ipoe.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c
index 51d53b16..16787e93 100644
--- a/drivers/ipoe/ipoe.c
+++ b/drivers/ipoe/ipoe.c
@@ -1886,11 +1886,17 @@ static int ipoe_nl_cmd_add_vlan_mon_vid(struct sk_buff *skb, struct genl_info *i
d->vid[vid / (8*sizeof(long))] &= ~(1lu << (vid % (8*sizeof(long))));
spin_unlock_irqrestore(&d->lock, flags);
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
- if (dev->features & NETIF_F_HW_VLAN_FILTER)
+ if (dev->features & NETIF_F_HW_VLAN_FILTER) {
+ rtnl_lock();
dev->netdev_ops->ndo_vlan_rx_add_vid(dev, vid);
+ rtnl_unlock();
+ }
#else
- if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER)
+ if (dev->features & NETIF_F_HW_VLAN_CTAG_FILTER) {
+ rtnl_lock();
dev->netdev_ops->ndo_vlan_rx_add_vid(dev, htons(ETH_P_8021Q), vid);
+ rtnl_unlock();
+ }
#endif
up(&ipoe_wlock);