]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: unregister wiphy before freeing resources
authorBrian Norris <briannorris@chromium.org>
Tue, 25 Jul 2017 01:13:21 +0000 (18:13 -0700)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jul 2017 14:47:47 +0000 (17:47 +0300)
commit33b07884e134531aa17d555ce72fb5f488fb5144
tree05cecd8052b6d54363b91b69e693f58089c3befc
parent771150cf17da99a11f3cff0c78fc5b97444f9051
mwifiex: unregister wiphy before freeing resources

It's possible for some control interfaces (e.g., scans, set freq) to be
active after we've stopped our main work queue and the netif TX queues.
These don't get completely shut out until we've unregistered the wdevs
and wiphy.

So let's only free command buffers and poison our lists after
wiphy_unregister().

This resolves various use-after-free issues seen when resetting the
device.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/init.c
drivers/net/wireless/marvell/mwifiex/main.c
drivers/net/wireless/marvell/mwifiex/main.h