* [PATCH] DM9000: fix use of kfree() on net device
@ 2007-05-07 11:13 Ben Dooks
2007-05-08 5:17 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2007-05-07 11:13 UTC (permalink / raw)
To: netdev, jeff
The DM9000 network driver is calling kfree() on an netdev
causing the system to oops if the probe fails. The right
thing to do is call free_netdev().
Thanks to Russell King for spotting this.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
diff -urpN -X ../dontdiff linux-2.6.20/drivers/net/dm9000.c linux-2.6.20-dmfix/drivers/net/dm9000.c
--- linux-2.6.20/drivers/net/dm9000.c 2007-02-04 18:44:54.000000000 +0000
+++ linux-2.6.20-dmfix/drivers/net/dm9000.c 2007-02-12 12:01:22.000000000 +0000
@@ -601,7 +601,7 @@ dm9000_probe(struct platform_device *pde
printk("%s: not found (%d).\n", CARDNAME, ret);
dm9000_release_board(pdev, db);
- kfree(ndev);
+ free_netdev(ndev);
return ret;
}
@@ -1194,7 +1194,7 @@ dm9000_drv_remove(struct platform_device
unregister_netdev(ndev);
dm9000_release_board(pdev, (board_info_t *) ndev->priv);
- kfree(ndev); /* free device structure */
+ free_netdev(ndev); /* free device structure */
PRINTK1("clean_module() exit\n");
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] DM9000: fix use of kfree() on net device
2007-05-07 11:13 [PATCH] DM9000: fix use of kfree() on net device Ben Dooks
@ 2007-05-08 5:17 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-05-08 5:17 UTC (permalink / raw)
To: Ben Dooks; +Cc: netdev
Ben Dooks wrote:
> The DM9000 network driver is calling kfree() on an netdev
> causing the system to oops if the probe fails. The right
> thing to do is call free_netdev().
>
> Thanks to Russell King for spotting this.
>
> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-08 5:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-07 11:13 [PATCH] DM9000: fix use of kfree() on net device Ben Dooks
2007-05-08 5:17 ` Jeff Garzik
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.