Patchwork [3/7] qlge: bugfix: Add missing put_page() call.

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

Comments

Ron Mercer - Feb. 11, 2009, 1:58 p.m.
We put the page 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:38 a.m.
From: Ron Mercer <ron.mercer@qlogic.com>
Date: Wed, 11 Feb 2009 05:58:33 -0800

> We put the page 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 69f7d05..5b75fc9 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -907,6 +907,8 @@  static void ql_update_lbq(struct ql_adapter *qdev, struct rx_ring *rx_ring)
 						   0, PAGE_SIZE,
 						   PCI_DMA_FROMDEVICE);
 				if (pci_dma_mapping_error(qdev->pdev, map)) {
+					put_page(lbq_desc->p.lbq_page);
+					lbq_desc->p.lbq_page = NULL;
 					QPRINTK(qdev, RX_STATUS, ERR,
 						"PCI mapping failed.\n");
 					return;