From a803c38139fc3e2bb218ea73afa00df9b33cbc14 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 27 Feb 2015 21:35:58 +0300 Subject: ipoe: driver: wrap vla_add_vid by rtnl_lock/rtnl_unlock --- drivers/ipoe/ipoe.c | 10 ++++++++-- 1 file 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); -- cgit v1.2.3