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>
This commit is contained in:
Varun Prakash 2016-11-05 21:49:28 +05:30 committed by Martin K. Petersen
parent a5dd506e15
commit 69e2d1e6c0
1 changed files with 2 additions and 1 deletions

View File

@ -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);