aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/cxgbi
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2016-11-05 21:49:28 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 19:11:01 -0500
commit69e2d1e6c0af0dd7f18cfd434b008844568641a9 (patch)
tree4090d7dd9018c332dcb1b3ca0c213f5995a151f9 /drivers/scsi/cxgbi
parentscsi: qla2xxx: Fix scsi scan hang triggered if adapter fails during init (diff)
downloadlinux-dev-69e2d1e6c0af0dd7f18cfd434b008844568641a9.tar.xz
linux-dev-69e2d1e6c0af0dd7f18cfd434b008844568641a9.zip
scsi: libcxgbi: fix incorrect DDP resource cleanup
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> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index d1421139e6ea..2ffe029ff2b6 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);