[openib-general] mthca: qp->wait uninitialized?

Michael S. Tsirkin mst at mellanox.co.il
Wed Sep 7 06:29:53 PDT 2005


----- Forwarded message from Leonid Keller <leonid at mellanox.co.il> -----

From: Leonid Keller <leonid at mellanox.co.il>
Subject: a bug or feature ?

i failed to find init if the wait queue of qp
(init_waitqueue_head(qp>wait)).
but there exist wake_up(qp->wait) and wait_on(qp->wait)	- see mthca_qp.c

----- End forwarded message -----

Roland, does the following make sense?

qp->wait does not seem to be initialized anywhere.

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c
===================================================================
--- linux-kernel.orig/drivers/infiniband/hw/mthca/mthca_qp.c	2005-09-07 16:20:18.025526000 +0300
+++ linux-kernel/drivers/infiniband/hw/mthca/mthca_qp.c	2005-09-07 16:20:37.435068000 +0300
@@ -1024,6 +1024,7 @@ static int mthca_alloc_qp_common(struct 
 	int i;
 
 	atomic_set(&qp->refcount, 1);
+	init_waitqueue_head(&qp->wait);
 	qp->state    	 = IB_QPS_RESET;
 	qp->atomic_rd_en = 0;
 	qp->resp_depth   = 0;

-- 
MST



More information about the general mailing list