Skip to content
  • Stanislaw Gruszka's avatar
    iwlwifi: fix scan abort · d28232b4
    Stanislaw Gruszka authored
    Fix possible double priv->mutex lock introduced by commit
    a69b03e9
    
    
    "iwlwifi: cancel scan watchdog in iwl_bg_abort_scan" .
    We can not call cancel_delayed_work_sync(&priv->scan_check) with
    priv->mutex locked because workqueue function iwl_bg_scan_check()
    take that lock internally.
    
    We do not need to synchronize when canceling priv->scan_check work.
    We can avoid races (sending double abort command or send no
    command at all) using STATUS_SCAN_ABORT bit. Moreover
    current iwl_bg_scan_check() code seems to be broken, as
    we should not send abort commands when currently aborting.
    
    Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
    CC: stable@kernel.org
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    d28232b4