All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: cxgb4i: fix Tx skb leak
@ 2017-10-11 14:03 Varun Prakash
  2017-10-11 18:28 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Varun Prakash @ 2017-10-11 14:03 UTC (permalink / raw)
  To: martin.petersen; +Cc: linux-scsi, indranil, varun

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>
---
 drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index 1d02cf9..30d5f0e 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);
-- 
2.0.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: cxgb4i: fix Tx skb leak
  2017-10-11 14:03 [PATCH] scsi: cxgb4i: fix Tx skb leak Varun Prakash
@ 2017-10-11 18:28 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2017-10-11 18:28 UTC (permalink / raw)
  To: Varun Prakash; +Cc: martin.petersen, linux-scsi, indranil


Varun,

> 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.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-11 18:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 14:03 [PATCH] scsi: cxgb4i: fix Tx skb leak Varun Prakash
2017-10-11 18:28 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.