Hello Roland,

      We have found several panics and memory leak for IPoIB-CM. I reviewed
the code and caught some issues. I will start to submit a list of patches
for review. i have tested the combined patch for connectX, it passed 24
hours 16 netperf/netserver bidirctional TCP, UDP stream test for 2.7.26-rc6
kernel.

      I turned on debug, I found that same QP context being destoryed twice
for nonSRQ connection. I reviewed the code and found that there is a window
the list could be added after the reap call, so checking the QP context
status is needed.

      My linux email client is broken, so I attach each patch here.

Address a possible race
-------------------
Signed-off-by: Shirley Ma <[EMAIL PROTECTED]>

 drivers/infiniband/ulp/ipoib/ipoib_cm.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c 
b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 97e67d3..0886ee7 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -559,9 +559,12 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct 
ib_wc *wc)
            else {
                  if (!--p->recv_count) {
                        spin_lock_irqsave(&priv->lock, flags);
-                       list_move(&p->list, &priv->cm.rx_reap_list);
-                       spin_unlock_irqrestore(&priv->lock, flags);
-                       queue_work(ipoib_workqueue, &priv->cm.rx_reap_task);
+                       if (p->state == IPOIB_CM_RX_LIVE) {
+                             list_move(&p->list, &priv->cm.rx_reap_list);
+                             spin_unlock_irqrestore(&priv->lock, flags);
+                             queue_work(ipoib_workqueue, 
&priv->cm.rx_reap_task);
+                       } else
+                             spin_unlock_irqrestore(&priv->lock, flags);
                  }
                  return;
            }

(See attached file: nonsrq_last_recv_race.patch)

Thanks
Shirley

Attachment: nonsrq_last_recv_race.patch
Description: Binary data

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to