netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qlcnic: Avoid double free of skb in tx path
@ 2011-06-03 15:52 Anirban Chakraborty
  2011-06-05 21:18 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Anirban Chakraborty @ 2011-06-03 15:52 UTC (permalink / raw)
  To: davem
  Cc: netdev, Dept_NX_Linux_NIC_Driver, sucheta.chakraborty,
	Anirban Chakraborty

From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>

buffer->skb should be marked NULL to avoid double free of the skb.

Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
---
 drivers/net/qlcnic/qlcnic_main.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 3ab7d2c..0f6af5c 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -2159,6 +2159,7 @@ qlcnic_unmap_buffers(struct pci_dev *pdev, struct sk_buff *skb,
 
 	nf = &pbuf->frag_array[0];
 	pci_unmap_single(pdev, nf->dma, skb_headlen(skb), PCI_DMA_TODEVICE);
+	pbuf->skb = NULL;
 }
 
 static inline void
-- 
1.7.4.1


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

* Re: [PATCH] qlcnic: Avoid double free of skb in tx path
  2011-06-03 15:52 [PATCH] qlcnic: Avoid double free of skb in tx path Anirban Chakraborty
@ 2011-06-05 21:18 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-06-05 21:18 UTC (permalink / raw)
  To: anirban.chakraborty; +Cc: netdev, Dept_NX_Linux_NIC_Driver, sucheta.chakraborty

From: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Date: Fri,  3 Jun 2011 08:52:18 -0700

> From: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
> 
> buffer->skb should be marked NULL to avoid double free of the skb.
> 
> Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com>
> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>

Applied.

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

end of thread, other threads:[~2011-06-05 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-03 15:52 [PATCH] qlcnic: Avoid double free of skb in tx path Anirban Chakraborty
2011-06-05 21:18 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).