diff options
author | Ivan Mikhaylov | 2016-09-14 19:06:45 +0300 |
---|---|---|
committer | David S. Miller | 2016-09-16 04:21:47 -0400 |
commit | 7106a069f45b15e63d14484e72969e64798e641c (patch) | |
tree | 758d517fc22dc2441bef59047a42218dd3d45c34 | |
parent | 01afd972a737879c1466a12f696601a2ce91ea84 (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/ibm/emac/core.c | 3 |
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) |