[Openib-windows] [PATCH] create cq with invalid CQ

Yossi Leybovich sleybo at mellanox.co.il
Tue Sep 6 09:51:49 PDT 2005


Fab


Our verification team found that creating RC QP with invalid CQ hang the
machine.
We found that the cid field is initialized only in init_conn_qp , so if you
call the function with invalid cq 
the code will call the destroy function that in case of connected QP will
test and set the cid field ( which is uninitialized)
[line 1086 in al_qp.c)
That will cause the cep destroy function to be called .... and the machine
hang.

Here is patch that fix this.

Thanks
Yossi 

Signed-off-by: Yossi Leybovich (sleybo at mellanox.co.il)

Index: al_qp.c
===================================================================
--- al_qp.c	(revision 346)
+++ al_qp.c	(working copy)
@@ -623,6 +623,9 @@
 	p_qp->pfn_init_dgrm_svc = al_bad_init_dgrm_svc;
 	p_qp->pfn_join_mcast = al_bad_join_mcast;
 
+	if(p_qp->type == IB_QPT_RELIABLE_CONN ||
+		p_qp->type == IB_QPT_UNRELIABLE_CONN)		
+			((al_conn_qp_t*)p_qp)->cid = AL_INVALID_CID;
 	return status;
 }
 
@@ -723,8 +726,7 @@
 	status = init_raw_qp( &p_conn_qp->qp, h_pd, UNBOUND_PORT_GUID,
 		p_qp_create, p_umv_buf );
 
-	p_conn_qp->cid = AL_INVALID_CID;
-
+	
 	return status;
 }
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050906/122b92c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cid.patch
Type: application/octet-stream
Size: 587 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050906/122b92c4/attachment.obj>


More information about the ofw mailing list