All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dl2k: nulify fraginfo after unmap
@ 2011-01-26 10:45 Stanislaw Gruszka
  2011-01-27 22:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2011-01-26 10:45 UTC (permalink / raw)
  To: netdev

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 <franta@hanzlici.cz>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/dl2k.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index e1a8216..c05db60 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -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];
-- 
1.7.3.4


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

* Re: [PATCH] dl2k: nulify fraginfo after unmap
  2011-01-26 10:45 [PATCH] dl2k: nulify fraginfo after unmap Stanislaw Gruszka
@ 2011-01-27 22:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-01-27 22:24 UTC (permalink / raw)
  To: sgruszka; +Cc: netdev

From: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Wed, 26 Jan 2011 11:45:42 +0100

> 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 <franta@hanzlici.cz>
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>

Applied.

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

end of thread, other threads:[~2011-01-27 22:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 10:45 [PATCH] dl2k: nulify fraginfo after unmap Stanislaw Gruszka
2011-01-27 22:24 ` 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.