diff options
author | Xinming Hu <huxm@marvell.com> | 2016-11-18 17:00:30 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-19 10:18:50 +0300 |
commit | bcf28a2f284643060cdee550290ca2c2a559aa8e (patch) | |
tree | 51fe5fb23dfddafae0eb5eb3912a3a3bc4c61d96 /drivers/net/wireless/marvell/mwifiex/usb.c | |
parent | b42dbb27e3260badaf540351889a1ebd6797575b (diff) | |
download | linux-bcf28a2f284643060cdee550290ca2c2a559aa8e.tar.xz |
mwifiex: reset card->adapter during device unregister
card->adapter gets initialized in mwifiex_register_dev(). As it's not
cleared in mwifiex_unregister_dev(), we may end up accessing the memory
which is already free in below scenario.
Scenario: Driver initialization is failed due to incorrect firmware or
some other reason. Meanwhile device reboot/unload occurs.
This is safe, now that we've properly synchronized suspend() and
remove() with the FW initialization thread; now that code can simply
check for 'card->adapter == NULL' and exit safely.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Tested-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/usb.c')
0 files changed, 0 insertions, 0 deletions