Skip to contentSkip to conversation

scsi: cxgb4i: fix Tx skb leak

PATCH Applied Varun Prakash 2 participants 2 messages Oct 11, 2017

Subsystems (2)
lore
Share & tools
lore

Varun Prakash

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 +
 1 file changed, 1 insertion(+)
drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +1 -0
index 1d02cf9..30d5f0e 100644
@@ -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);
Signature · 1 line
2.0.2
#1 lore raw

Varun,

Quoted 3 lines

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.

Applied to 4.15/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering