summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorIvan Mikhaylov <ivan@de.ibm.com>2016-09-14 19:06:45 +0300
committerDavid S. Miller <davem@davemloft.net>2016-09-16 11:21:47 +0300
commit7106a069f45b15e63d14484e72969e64798e641c (patch)
tree758d517fc22dc2441bef59047a42218dd3d45c34 /drivers/net/ethernet/ibm
parent01afd972a737879c1466a12f696601a2ce91ea84 (diff)
downloadlinux-7106a069f45b15e63d14484e72969e64798e641c.tar.xz
net/ibm/emac: add mutex to 'set multicast list'
for preventing race conditions within ioctl calls. Signed-off-by: Ivan Mikhaylov <ivan@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/emac/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 2dfc60308648..7af09cbc53f0 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -977,7 +977,10 @@ static void emac_set_multicast_list(struct net_device *ndev)
dev->mcast_pending = 1;
return;
}
+
+ mutex_lock(&dev->link_lock);
__emac_set_multicast_list(dev);
+ mutex_unlock(&dev->link_lock);
}
static int emac_set_mac_address(struct net_device *ndev, void *sa)