All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4.9/scsi-fixes] libcxgbi: fix incorrect DDP resource cleanup
@ 2016-11-05 16:19 Varun Prakash
  2016-11-09  0:12 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Varun Prakash @ 2016-11-05 16:19 UTC (permalink / raw)
  To: martin.petersen, jejb; +Cc: linux-scsi, indranil, varun

Before calling task_release_itt() task data is memset
to zero because of which DDP context information is lost
resulting in incorrect DDP resource cleanup, to fix
this call task_release_itt() before memset.

Signed-off-by: Varun Prakash <varun@chelsio.com>
---
 drivers/scsi/cxgbi/libcxgbi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index d142113..2ffe029 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2081,9 +2081,10 @@ void cxgbi_cleanup_task(struct iscsi_task *task)
 	/*  never reached the xmit task callout */
 	if (tdata->skb)
 		__kfree_skb(tdata->skb);
-	memset(tdata, 0, sizeof(*tdata));
 
 	task_release_itt(task, task->hdr_itt);
+	memset(tdata, 0, sizeof(*tdata));
+
 	iscsi_tcp_cleanup_task(task);
 }
 EXPORT_SYMBOL_GPL(cxgbi_cleanup_task);
-- 
2.0.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-09  0:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-05 16:19 [PATCH 4.9/scsi-fixes] libcxgbi: fix incorrect DDP resource cleanup Varun Prakash
2016-11-09  0:12 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.