Skip to contentSkip to conversation

bnx2: Fix bug in bnx2_free_rx_mem().

PATCH Applied Michael Chan 2 participants 2 messages Dec 18, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2: Fix bug in bnx2_free_rx_mem().

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

---
 drivers/net/bnx2.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/bnx2.c +3 -3
index a1a3d0e..9e8222f 100644
@@ -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);
Signature · 1 line
1.5.6.GIT