[patch] plip unload problems

From: Philip Blundell (Philip.Blundell@pobox.com)
Date: Sat Jun 10 2000 - 09:30:06 EST


The PLIP driver in 2.4.0-test1 is a bit sloppy about freeing resources when
unloaded, or when it fails to initialise. Eventually this leads to a crash.

p.

--- linux/drivers/net/plip.c Sat May 13 23:11:57 2000
+++ linux/drivers/net/plip.c Sat Jun 10 15:00:26 2000
@@ -1314,7 +1314,6 @@
                                 parport_release(nl->pardev);
                         parport_unregister_device(nl->pardev);
                         kfree(dev_plip[i]->priv);
- kfree(dev_plip[i]->name);
                         kfree(dev_plip[i]);
                         dev_plip[i] = NULL;
                 }
@@ -1396,9 +1395,8 @@
                         }
                         memset(dev_plip[i], 0, sizeof(struct net_device));
                         sprintf(dev_plip[i]->name, "plip%d", i);
- dev_plip[i]->priv = pb;
                         if (plip_init_dev(dev_plip[i],pb) || register_netdev(dev_plip[i])) {
- kfree(dev_plip[i]->name);
+ kfree(dev_plip[i]->priv);
                                 kfree(dev_plip[i]);
                                 dev_plip[i] = NULL;
                         } else {

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



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:21 EST