projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
22138d3
)
sgiseeq: use free_netdev(netdev) instead of kfree()
author
Kulikov Vasiliy
<segooon@gmail.com>
Sat, 25 Sep 2010 23:58:06 +0000
(23:58 +0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 27 Sep 2010 01:54:34 +0000
(18:54 -0700)
Freeing netdev without free_netdev() leads to net, tx leaks.
I might lead to dereferencing freed pointer.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
@@
struct net_device* dev;
@@
-kfree(dev)
+free_netdev(dev)
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sgiseeq.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/sgiseeq.c
b/drivers/net/sgiseeq.c
index cc4bd8c65f8b6a58846065430f8b89c1be6a4bc3..9265315baa0b29bdc2c7a9e20db20462dcf52ae5 100644
(file)
--- a/
drivers/net/sgiseeq.c
+++ b/
drivers/net/sgiseeq.c
@@
-804,7
+804,7
@@
static int __devinit sgiseeq_probe(struct platform_device *pdev)
err_out_free_page:
free_page((unsigned long) sp->srings);
err_out_free_dev:
-
kfree
(dev);
+
free_netdev
(dev);
err_out:
return err;