• Brian Norris's avatar
    mwifiex: unregister wiphy before freeing resources · ce32d1d8
    Brian Norris authored
    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: default avatarBrian Norris <briannorris@chromium.org>
    Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
    ce32d1d8
init.c 21.2 KB