qlcnic: Avoid double free of skb in tx path

Submitted by Anirban Chakraborty on June 3, 2011, 3:52 p.m.

Details

Message ID 1307116338-1686-1-git-send-email-anirban.chakraborty@qlogic.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Anirban Chakraborty June 3, 2011, 3:52 p.m.
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(-)

Comments

David Miller June 5, 2011, 9:18 p.m.
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

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