mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [git patch review 1/6] IPoIB: Take dev->xmit_lock around mc_list accesses
@ 2006-01-13  0:13 Roland Dreier
  2006-01-13  0:13 ` [git patch review 2/6] IPoIB: Fix memory leak of multicast group structures Roland Dreier
  0 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2006-01-13  0:13 UTC (permalink / raw)
  To: linux-kernel, openib-general

dev->mc_list accesses must be protected by dev->xmit_lock.
Found by Eli Cohen <eli@mellanox.co.il>.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

---

 drivers/infiniband/ulp/ipoib/ipoib_multicast.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

78bfe0b5b67fe126ed98608e42e42fb6ed9aabd4
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 03b2ca6..bf1c08c 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -827,7 +827,8 @@ void ipoib_mcast_restart_task(void *dev_
 
 	ipoib_mcast_stop_thread(dev, 0);
 
-	spin_lock_irqsave(&priv->lock, flags);
+	spin_lock_irqsave(&dev->xmit_lock, flags);
+	spin_lock(&priv->lock);
 
 	/*
 	 * Unfortunately, the networking core only gives us a list of all of
@@ -899,7 +900,9 @@ void ipoib_mcast_restart_task(void *dev_
 			list_add_tail(&mcast->list, &remove_list);
 		}
 	}
-	spin_unlock_irqrestore(&priv->lock, flags);
+
+	spin_unlock(&priv->lock);
+	spin_unlock_irqrestore(&dev->xmit_lock, flags);
 
 	/* We have to cancel outside of the spinlock */
 	list_for_each_entry_safe(mcast, tmcast, &remove_list, list) {
-- 
1.0.7

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

end of thread, other threads:[~2006-01-13  0:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-13  0:13 [git patch review 1/6] IPoIB: Take dev->xmit_lock around mc_list accesses Roland Dreier
2006-01-13  0:13 ` [git patch review 2/6] IPoIB: Fix memory leak of multicast group structures Roland Dreier
2006-01-13  0:13   ` [git patch review 3/6] IB/mthca: " Roland Dreier
2006-01-13  0:13     ` [git patch review 4/6] IB/mthca: Fix memory leaks in error handling Roland Dreier
2006-01-13  0:13       ` [git patch review 5/6] IB/mthca: Cosmetic: use the ALIGN macro Roland Dreier
2006-01-13  0:13         ` [git patch review 6/6] IB/mthca: Initialize grh_present before using it Roland Dreier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®