Re: Oops on removing via-rhine [2.4.10-ac11]

From: Urban Widmark (urban@teststation.com)
Date: Sat Oct 13 2001 - 05:55:54 EST


On Thu, 11 Oct 2001, Andrew Over wrote:

> Trace; c010b6bc <pci_free_consistent+1c/20>
> Trace; e08fdbaa <[via-rhine]via_rhine_remove_one+2a/40>

remove_one shouldn't call pci_free_consistent as that is already done in
via_rhine_close (and I am assuming that if you open you must always close
before remove ...).

I could repeat some kind of crash, but could you please test if the patch
below fixes the crash you see. patch vs 2.4.13-pre2, but should apply vs
others as well.

/Urban

diff -urN -X exclude linux-2.4.13-pre2-orig/drivers/net/via-rhine.c linux/drivers/net/via-rhine.c
--- linux-2.4.13-pre2-orig/drivers/net/via-rhine.c Sat Oct 13 12:05:38 2001
+++ linux/drivers/net/via-rhine.c Sat Oct 13 12:34:00 2001
@@ -764,6 +764,7 @@
                             RX_RING_SIZE * sizeof(struct rx_desc) +
                             TX_RING_SIZE * sizeof(struct tx_desc),
                             np->rx_ring, np->rx_ring_dma);
+ np->tx_ring = NULL;
 
         if (np->tx_bufs)
                 pci_free_consistent(np->pdev, PKT_BUF_SZ * TX_RING_SIZE,
@@ -1595,11 +1596,6 @@
 #ifndef USE_IO
         iounmap((char *)(dev->base_addr));
 #endif
-
- pci_free_consistent(pdev,
- RX_RING_SIZE * sizeof(struct rx_desc) +
- TX_RING_SIZE * sizeof(struct tx_desc),
- np->rx_ring, np->rx_ring_dma);
 
         kfree(dev);
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Oct 15 2001 - 21:00:48 EST