All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bnx2: Fix bug in bnx2_free_rx_mem().
@ 2008-12-18  2:59 Michael Chan
  2008-12-18  3:06 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Chan @ 2008-12-18  2:59 UTC (permalink / raw)
  To: davem; +Cc: netdev, Michael Chan

DMA memory for the jumbo rx page rings was freed incorrectly using the
wrong local variable as the array index.

Signed-off-by: Michael Chan <mchan@broadcom.com>
---
 drivers/net/bnx2.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index a1a3d0e..9e8222f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -543,9 +543,9 @@ bnx2_free_rx_mem(struct bnx2 *bp)
 		for (j = 0; j < bp->rx_max_pg_ring; j++) {
 			if (rxr->rx_pg_desc_ring[j])
 				pci_free_consistent(bp->pdev, RXBD_RING_SIZE,
-						    rxr->rx_pg_desc_ring[i],
-						    rxr->rx_pg_desc_mapping[i]);
-			rxr->rx_pg_desc_ring[i] = NULL;
+						    rxr->rx_pg_desc_ring[j],
+						    rxr->rx_pg_desc_mapping[j]);
+			rxr->rx_pg_desc_ring[j] = NULL;
 		}
 		if (rxr->rx_pg_ring)
 			vfree(rxr->rx_pg_ring);
-- 
1.5.6.GIT



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

end of thread, other threads:[~2008-12-18  3:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18  2:59 [PATCH] bnx2: Fix bug in bnx2_free_rx_mem() Michael Chan
2008-12-18  3:06 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.