davinci_emac: Fix use after free in davinci_emac_remove
commit2a1bc0d56b446104a3a728925b3a7afbef64afa7
authorStefan Weil <weil@mail.berlios.de>
Tue, 3 Aug 2010 08:53:45 +0000 (3 08:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Aug 2010 23:18:03 +0000 (4 16:18 -0700)
tree2c484fa53420a3c673142551daccc45b0f803d10
parent889635fd6b269963f7e68b53c9f0f60c8008a77f
davinci_emac: Fix use after free in davinci_emac_remove

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 <davem@davemloft.net>
Cc: Chaithrika U S <chaithrika@ti.com>
Cc: Sriramakrishnan <srk@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/davinci_emac.c