Patchwork [4/7] qlge: bugfix: Add missing dev_kfree_skb_any() call.

login
register
mail settings
Submitter Ron Mercer
Date Feb. 11, 2009, 1:58 p.m.
Message ID <1234360717-32194-4-git-send-email-ron.mercer@qlogic.com>
Download mbox | patch
Permalink /patch/22919/
State Accepted
Delegated to: David Miller
Headers show

Comments

Ron Mercer - Feb. 11, 2009, 1:58 p.m.
We put the skb back if we can't get mapping for it.  We don't
want unmapped buffers on our receive buffer queue.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
---
 drivers/net/qlge/qlge_main.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
David Miller - Feb. 13, 2009, 12:39 a.m.
From: Ron Mercer <ron.mercer@qlogic.com>
Date: Wed, 11 Feb 2009 05:58:34 -0800

> We put the skb back if we can't get mapping for it.  We don't
> want unmapped buffers on our receive buffer queue.
> 
> Signed-off-by: Ron Mercer <ron.mercer@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

diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 5b75fc9..fc7d210 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -970,6 +970,8 @@  static void ql_update_sbq(struct ql_adapter *qdev, struct rx_ring *rx_ring)
 				if (pci_dma_mapping_error(qdev->pdev, map)) {
 					QPRINTK(qdev, IFUP, ERR, "PCI mapping failed.\n");
 					rx_ring->sbq_clean_idx = clean_idx;
+					dev_kfree_skb_any(sbq_desc->p.skb);
+					sbq_desc->p.skb = NULL;
 					return;
 				}
 				pci_unmap_addr_set(sbq_desc, mapaddr, map);