dl2k: nulify fraginfo after unmap
Subsystems (2)
PATCH 1/1 dl2k: nulify fraginfo after unmap
Patch fixes: "DMA-API: device driver tries to free an invalid DMA memory address" warning reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=639824
Reported-by Frantisek Hanzlik <[email protected]>
Signed-off-by Stanislaw Gruszka <[email protected]>
--- drivers/net/dl2k.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/dl2k.c +2 -2
@@ -1753,8 +1753,6 @@ rio_close (struct net_device *dev)/* Free all the skbuffs in the queue. */ for (i =0 ; i <RX_RING_SIZE ; i++) { - np->rx_ring[i].status =0 ; - np->rx_ring[i].fraginfo =0 ; skb = np->rx_skbuff[i];if (skb) { pci_unmap_single(np->pdev,
@@ -1763,6 +1761,8 @@ rio_close (struct net_device *dev)dev_kfree_skb (skb); np->rx_skbuff[i] =NULL ; } + np->rx_ring[i].status =0 ; + np->rx_ring[i].fraginfo =0 ; }for (i =0 ; i <TX_RING_SIZE ; i++) { skb = np->tx_skbuff[i];
Signature · 1 line
1.7.3.4
From: Stanislaw Gruszka <[email protected]>
Date: Wed, 26 Jan 2011 11:45:42 +0100
Quoted 6 lines
Patch fixes: "DMA-API: device driver tries to free an invalid DMA memory address" warning reported here:
https://bugzilla.redhat.com/show_bug.cgi?id=639824Reported-by Frantisek Hanzlik <[email protected]>Signed-off-by Stanislaw Gruszka <[email protected]>
Applied.