Skip to content

Commit

Permalink
net/ibm/emac: add mutex to 'set multicast list'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivan Mikhaylov authored and David S. Miller committed Sep 16, 2016
1 parent 01afd97 commit 7106a06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/ibm/emac/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7106a06

Please sign in to comment.