[openib-general] [PATCH] iser: double kmem_cache destory bugfix

Or Gerlitz ogerlitz at voltaire.com
Sat Jan 14 22:41:30 PST 2006


avoid buggy kmem_cache_destory on repeated connect/disconnect cycles, refine 
the predicate used to print an error related to the processing of error-ed WC.

Signed-off-by: Or Gerlitz <ogerlitz.voltaire.com>

Index: iser_verbs.c
===================================================================
--- iser_verbs.c	(revision 4984)
+++ iser_verbs.c	(revision 4985)
@@ -670,7 +670,8 @@ static void iser_handle_comp_error(enum 
 		iser_dbg("Conn. 0x%p is being terminated asynchronously\n", p_iser_conn);
 	}
 	/* Handle completion Error */
-	if (iser_dto_completion_error(p_dto))
+	ret_val = iser_dto_completion_error(p_dto);
+	if (ret_val && ret_val != -EAGAIN)
 		iser_err("Failed to handle ERROR DTO completion\n");
 }
 
Index: iser_conn.c
===================================================================
--- iser_conn.c	(revision 4984)
+++ iser_conn.c	(revision 4985)
@@ -381,6 +381,7 @@ void iser_conn_release(struct iser_conn 
 			if(kmem_cache_destroy(p_iscsi_conn->postrecv_cache) != 0)
 				iser_err("postrecv cache %s not empty, leak!\n",
 					 p_iscsi_conn->postrecv_cn);
+			p_iscsi_conn->ff_mode_enabled = 0;
 		}
 		/* release socket with conn descriptor */
 		sock_release(iser_conn_to_sock(p_iser_conn));




More information about the general mailing list