netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] net/ibm/emac: add mutex to 'set multicast list'
@ 2016-09-14 16:06 Ivan Mikhaylov
  2016-09-16  8:22 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Mikhaylov @ 2016-09-14 16:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: netdev

for preventing race conditions within ioctl calls.

Signed-off-by: Ivan Mikhaylov <ivan@de.ibm.com>
---
 drivers/net/ethernet/ibm/emac/core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 2dfc603..7af09cb 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)
-- 
2.7.4 (Apple Git-66)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] net/ibm/emac: add mutex to 'set multicast list'
  2016-09-14 16:06 [PATCH 2/2] net/ibm/emac: add mutex to 'set multicast list' Ivan Mikhaylov
@ 2016-09-16  8:22 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-09-16  8:22 UTC (permalink / raw)
  To: ivan; +Cc: linux-kernel, netdev

From: Ivan Mikhaylov <ivan@de.ibm.com>
Date: Wed, 14 Sep 2016 19:06:45 +0300

> for preventing race conditions within ioctl calls.
> 
> Signed-off-by: Ivan Mikhaylov <ivan@de.ibm.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-16  8:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 16:06 [PATCH 2/2] net/ibm/emac: add mutex to 'set multicast list' Ivan Mikhaylov
2016-09-16  8:22 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).