[openib-general] [PATCH] sdp_post_rdma_iocb_snk check iocb

Michael S. Tsirkin mst at mellanox.co.il
Wed Jun 15 02:44:08 PDT 2005


In sdp_post_rdma_iocb_snk, if sdp_iocb_q_get_head returns NULL, iocb is then
used without checking.

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

Index: sdp_recv.c
===================================================================
--- sdp_recv.c	(revision 2608)
+++ sdp_recv.c	(working copy)
@@ -411,7 +411,7 @@ static int sdp_post_rdma_iocb_snk(struct
 	 * queue IOCB
 	 */
 	iocb = sdp_iocb_q_get_head(&conn->r_pend);
-	if (result < 0) {
+	if (!iocb) {
 		sdp_dbg_warn(conn, "read IOCB missing from pending table <%d>",
 			     sdp_iocb_q_size(&conn->r_pend));
 		goto release;

-- 
MST



More information about the general mailing list