projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c95aef4
)
staging: wlags49_h2: use free_netdev(netdev) instead of kfree()
author
Vasiliy Kulikov
<segooon@gmail.com>
Tue, 28 Sep 2010 17:08:11 +0000
(21:08 +0400)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Thu, 30 Sep 2010 11:14:07 +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/wlags49_h2/wl_netdev.c
patch
|
blob
|
history
diff --git
a/drivers/staging/wlags49_h2/wl_netdev.c
b/drivers/staging/wlags49_h2/wl_netdev.c
index e2a7ad05e545f91f85b8762873738db2ffb349de..954becee40d6c0568c4124a337a1ed8f5c3bf53a 100644
(file)
--- a/
drivers/staging/wlags49_h2/wl_netdev.c
+++ b/
drivers/staging/wlags49_h2/wl_netdev.c
@@
-1586,7
+1586,7
@@
void wl_wds_device_dealloc( struct wl_private *lp )
dev_wds->flags &= ~( IFF_UP | IFF_RUNNING );
}
-
kfree( dev_wds
);
+
free_netdev(dev_wds
);
lp->wds_port[count].dev = NULL;
}
}