]> git.baikalelectronics.ru Git - kernel.git/commit
wil6210: fix free'd memory access in wil_if_free()
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Wed, 6 Aug 2014 07:31:59 +0000 (10:31 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Aug 2014 20:17:37 +0000 (16:17 -0400)
commitd9b4ebd4b4240856b96711e95890221c80fc7f14
treec058201be7828aa96266bea275b6a28d28e43507
parentaefbb4d71fed5a16286a2f24a5a7e41db439c1c3
wil6210: fix free'd memory access in wil_if_free()

In the wil_priv_deinit(), wdev->netdev is accessed, so free_netdev()
should not be called before mentioned call.

Set wdev->netdev to NULL Make sure no more attempts to use it.
It is used for debug printk if not NULL.

This fix kernel panic on module unload and in case error on probe;
if memory allocation debugging enabled.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/netdev.c