patch-2.3.40 linux/drivers/net/lance.c
Next file: linux/drivers/net/oaknet.c
Previous file: linux/drivers/net/Makefile
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
Thu Jan 20 10:44:46 2000
- Orig file:
v2.3.39/linux/drivers/net/lance.c
- Orig date:
Wed Dec 8 14:11:26 1999
diff -u --recursive --new-file v2.3.39/linux/drivers/net/lance.c linux/drivers/net/lance.c
@@ -40,12 +40,16 @@
8/20/96 Fixed 7990 autoIRQ failure and reversed unneeded alignment -djb
v1.12 10/27/97 Module support -djb
v1.14 2/3/98 Module support modified, made PCI support optional -djb
+ v1.15 5/27/99 Fixed bug in the cleanup_module(). dev->priv was freed
+ before unregister_netdev() which caused NULL pointer
+ reference later in the chain (in rtnetlink_fill_ifinfo())
+ -- Mika Kuoppala <miku@iki.fi>
Forward ported v1.14 to 2.1.129, merged the PCI and misc changes from
the 2.1 version of the old driver - Alan Cox
*/
-static const char *version = "lance.c:v1.14ac 1998/11/20 dplatt@3do.com, becker@cesdis.gsfc.nasa.gov\n";
+static const char *version = "lance.c:v1.15ac 1999/11/13 dplatt@3do.com, becker@cesdis.gsfc.nasa.gov\n";
#include <linux/config.h>
#include <linux/module.h>
@@ -349,11 +353,11 @@
for (this_dev = 0; this_dev < MAX_CARDS; this_dev++) {
struct net_device *dev = &dev_lance[this_dev];
if (dev->priv != NULL) {
- kfree(dev->priv);
- dev->priv = NULL;
+ unregister_netdev(dev);
free_dma(dev->dma);
release_region(dev->base_addr, LANCE_TOTAL_SIZE);
- unregister_netdev(dev);
+ kfree(dev->priv);
+ dev->priv = NULL;
}
}
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)