Skip to content

Commit

Permalink
scsi: cxgb4i: fix Tx skb leak
Browse files Browse the repository at this point in the history
[ Upstream commit 9b3a081 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Varun Prakash authored and Greg Kroah-Hartman committed Dec 25, 2017
1 parent ac8283d commit 98c3d06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
Original file line number Diff line number Diff line change
Expand Up @@ -1262,6 +1262,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);
Expand Down

0 comments on commit 98c3d06

Please sign in to comment.