aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2017-10-11 19:33:07 +0530
committerMartin K. Petersen <martin.petersen@oracle.com>2017-10-11 14:25:28 -0400
commit9b3a081fb62158b50bcc90522ca2423017544367 (patch)
treea3d91937d2dfe5778432caa3b97f38550d8e0150 /drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
parent4c2a02157fdd5dc71de7cf42eff07576746eb450 (diff)
download96b-common-9b3a081fb62158b50bcc90522ca2423017544367.tar.gz
scsi: cxgb4i: fix Tx skb leak
In case of connection reset Tx skb queue can have some skbs which are not transmitted so purge Tx skb queue in release_offload_resources() to avoid skb leak. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/cxgbi/cxgb4i/cxgb4i.c')
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 1d02cf9fe06c..30d5f0ef29bb 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1575,6 +1575,7 @@ static void release_offload_resources(struct cxgbi_sock *csk)
csk, csk->state, csk->flags, csk->tid);
cxgbi_sock_free_cpl_skbs(csk);
+ cxgbi_sock_purge_write_queue(csk);
if (csk->wr_cred != csk->wr_max_cred) {
cxgbi_sock_purge_wr_queue(csk);
cxgbi_sock_reset_wr_list(csk);