From: Sucheta Chakraborty Date: Fri, 3 Jun 2011 05:52:18 +0000 (+0000) Subject: qlcnic: Avoid double free of skb in tx path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b446c6a7179513edcb34706088c4ce901b9a039;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git qlcnic: Avoid double free of skb in tx path buffer->skb should be marked NULL to avoid double free of the skb. Signed-off-by: Sucheta Chakraborty Signed-off-by: Anirban Chakraborty Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 3ab7d2c7baf2..0f6af5c61a7c 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