<br><font size=2 face="sans-serif">Roland, </font>
<br>
<br><font size=2 face="sans-serif">Please review this patch.</font>
<br>
<br><font size=2 face="sans-serif">This patch has fixed a deadlock problem:
the caller calls ipoib_put_ah() while holding priv->lock. (In ipoib_free_ah()
the same lock is reacquired.) This also fixes the ipoib_flush_paths() calls
__patch_free() without holding priv->lock.</font>
<br>
<br><font size=2 face="sans-serif">My email has problem to inline patches.
So I inline this patch for review and an attached file for applying this
patch. Sorry for the inconvenient.</font>
<br>
<div>
<br><font size=2 face="sans-serif">diff -urN infiniband/ulp/ipoib/ipoib_ib.c
infiniband-panic/ulp/ipoib/ipoib_ib.c<br>
--- infiniband/ulp/ipoib/ipoib_ib.c        2005-02-09
10:45:06.000000000 -0800<br>
+++ infiniband-panic/ulp/ipoib/ipoib_ib.c        2005-02-14
14:52:43.000000000 -0800<br>
@@ -85,11 +85,8 @@<br>
                 ipoib_dbg(priv,
"Freeing ah %p\n", ah->ah);<br>
                 ib_destroy_ah(ah->ah);<br>
                 kfree(ah);<br>
-        } else {<br>
-                spin_lock_irqsave(&priv->lock,
flags);<br>
+        } else<br>
                 list_add_tail(&ah->list,
&priv->dead_ahs);<br>
-                spin_unlock_irqrestore(&priv->lock,
flags);<br>
-        }<br>
 }<br>
 <br>
 static inline int ipoib_ib_receive(struct ipoib_dev_priv *priv,<br>
diff -urN infiniband/ulp/ipoib/ipoib_main.c infiniband-panic/ulp/ipoib/ipoib_main.c<br>
--- infiniband/ulp/ipoib/ipoib_main.c        2005-02-04
16:05:13.000000000 -0800<br>
+++ infiniband-panic/ulp/ipoib/ipoib_main.c        2005-02-11
15:00:33.000000000 -0800<br>
@@ -256,7 +256,9 @@<br>
                 if
(path->query)<br>
                  
      ib_sa_cancel_query(path->query_id, path->query);<br>
                 wait_for_completion(&path->done);<br>
+                spin_lock_irqsave(&priv->lock,
flags);<br>
                 __path_free(dev,
path);<br>
+                spin_unlock_irqrestore(&priv->lock,
flags);</font>
<br><font size=2 face="sans-serif">         }<br>
 }<br>
 <br>
diff -urN infiniband/ulp/ipoib/ipoib_multicast.c infiniband-panic/ulp/ipoib/ipoib_multicast.c<br>
--- infiniband/ulp/ipoib/ipoib_multicast.c        2005-02-04
16:05:13.000000000 -0800<br>
+++ infiniband-panic/ulp/ipoib/ipoib_multicast.c        2005-02-14
14:54:52.000000000 -0800<br>
@@ -107,11 +107,11 @@<br>
                 kfree(neigh);<br>
         }<br>
 <br>
-        spin_unlock_irqrestore(&priv->lock,
flags);<br>
-<br>
         if (mcast->ah)<br>
                 ipoib_put_ah(mcast->ah);<br>
 <br>
+        spin_unlock_irqrestore(&priv->lock,
flags);<br>
+<br>
         while (!skb_queue_empty(&mcast->pkt_queue))
{<br>
                 struct
sk_buff *skb = skb_dequeue(&mcast->pkt_queue);</font>
<br>
<br><font size=2 face="sans-serif"><br>
 </font>
<br><font size=2 face="sans-serif"><br>
Thanks<br>
Shirley Ma<br>
IBM Linux Technology Center<br>
15300 SW Koll Parkway<br>
Beaverton, OR 97006-6063<br>
Phone(Fax): (503) 578-7638<br>
<br>
</font></div>