[openib-general] [PATCH] RDMA/iwcm: Teach lockdep about nesting of lock-classes.

Krishna Kumar krkumar2 at in.ibm.com
Thu Nov 16 20:31:28 PST 2006


I sometimes get this erroneous warning message about lock recursion :

: [ INFO: possible recursive locking detected ]
: rdma_bw/3558 is trying to acquire lock:
:  (&cq->lock){....}, at: [<f9398d36>] c2_free_qp+0x78/0x180 [iw_c2]
: but task is already holding lock:
:  (&cq->lock){....}, at: [<f9398d29>] c2_free_qp+0x6b/0x180 [iw_c2]

The fix is to teach lockdep about this nesting of a lock-class.

Patch against 2.6.19-rc5.

Signed-off-by: Krishna Kumar <krkumar2 at in.ibm.com>
---
diff -ruNp org/drivers/infiniband/hw/amso1100/c2_qp.c new/drivers/infiniband/hw/amso1100/c2_qp.c
--- org/drivers/infiniband/hw/amso1100/c2_qp.c	2006-11-15 12:40:04.000000000 +0530
+++ new/drivers/infiniband/hw/amso1100/c2_qp.c	2006-11-15 13:02:03.000000000 +0530
@@ -578,7 +578,7 @@ void c2_free_qp(struct c2_dev *c2dev, st
 	 */
 	spin_lock_irq(&send_cq->lock);
 	if (send_cq != recv_cq)
-		spin_lock(&recv_cq->lock);
+		spin_lock_nested(&recv_cq->lock, SINGLE_DEPTH_NESTING);
 
 	c2_free_qpn(c2dev, qp->qpn);
 




More information about the general mailing list