summaryrefslogtreecommitdiff
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-02 22:46:10 +0000
committerDavid S. Miller <davem@davemloft.net>2010-03-03 01:04:37 -0800
commit48a29516e8b0b8cd59f5afec90a14f49dd9cf967 (patch)
tree52d72a624421b3372c1a2e8a4143d2a246d364d5 /drivers/net/cpmac.c
parent87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9 (diff)
downloadlinux-3.10-48a29516e8b0b8cd59f5afec90a14f49dd9cf967.tar.gz
linux-3.10-48a29516e8b0b8cd59f5afec90a14f49dd9cf967.tar.bz2
linux-3.10-48a29516e8b0b8cd59f5afec90a14f49dd9cf967.zip
cpmac: use after free
The original code dereferenced "cpmac_mii" after calling "mdiobus_free(cpmac_mii);" Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r--drivers/net/cpmac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index b85c81f60d1..9d489421535 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -1290,8 +1290,8 @@ void __devexit cpmac_exit(void)
{
platform_driver_unregister(&cpmac_driver);
mdiobus_unregister(cpmac_mii);
- mdiobus_free(cpmac_mii);
iounmap(cpmac_mii->priv);
+ mdiobus_free(cpmac_mii);
}
module_init(cpmac_init);