Message ID | 1229569149-18954-1-git-send-email-mchan@broadcom.com |
---|---|
State | Accepted, archived |
Headers | show |
From: "Michael Chan" <mchan@broadcom.com> Date: Wed, 17 Dec 2008 18:59:09 -0800 > 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> Applied to net-2.6, thanks Michael. -- 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
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);
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(-)