projects
/
GitHub
/
LineageOS
/
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:
b37e0c6
)
staging: otus: use free_netdev(netdev) instead of kfree()
author
Vasiliy Kulikov
<segooon@gmail.com>
Tue, 28 Sep 2010 17:08:04 +0000
(21:08 +0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 30 Sep 2010 11:14:08 +0000
(
04:14
-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: Vasiliy Kulikov <segooon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/otus/usbdrv.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/staging/otus/usbdrv.c
b/drivers/staging/otus/usbdrv.c
index 165a82b9ab85bace83583e722b6d5513260599d0..9a5c4152aac4de4b37983023553f4beaba2b0d67 100644
(file)
--- a/
drivers/staging/otus/usbdrv.c
+++ b/
drivers/staging/otus/usbdrv.c
@@
-690,7
+690,7
@@
void usbdrv_clear_structs(struct net_device *dev)
kfree(macp);
-
kfree
(dev);
+
free_netdev
(dev);
}