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:
889635f
)
davinci_emac: Fix use after free in davinci_emac_remove
author
Stefan Weil
<
[email protected]
>
Tue, 3 Aug 2010 08:53:45 +0000
(08:53 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 4 Aug 2010 23:18:03 +0000
(16:18 -0700)
free_netdev finally calls kfree which makes the contents
of ndev and priv (private data contained in ndev) invalid.
So iounmap should be called before free_netdev.
Cc: David S. Miller <
[email protected]
>
Cc: Chaithrika U S <
[email protected]
>
Cc: Sriramakrishnan <
[email protected]
>
Cc: Kevin Hilman <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Signed-off-by: Stefan Weil <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/davinci_emac.c
patch
|
blob
|
history
diff --git
a/drivers/net/davinci_emac.c
b/drivers/net/davinci_emac.c
index d0824e322068d4842ebdee10a7cce87a87a7247c..7fbd052ddb0a2b20e33bad64820fa9cc41dbbeb5 100644
(file)
--- a/
drivers/net/davinci_emac.c
+++ b/
drivers/net/davinci_emac.c
@@
-2944,8
+2944,8
@@
static int __devexit davinci_emac_remove(struct platform_device *pdev)
release_mem_region(res->start, res->end - res->start + 1);
unregister_netdev(ndev);
- free_netdev(ndev);
iounmap(priv->remap_addr);
+ free_netdev(ndev);
clk_disable(emac_clk);
clk_put(emac_clk);