lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.7 144/179] iwlwifi: mvm: dont call iwl_mvm_free_inactive_queue() under RCU
    Date
    From: Johannes Berg <johannes.berg@intel.com>

    commit fbb1461ad1d6eacca9beb69a2f3ce1b5398d399b upstream.

    iwl_mvm_free_inactive_queue() will sleep in synchronize_net() under
    some circumstances, so don't call it under RCU. There doesn't appear
    to be a need for RCU protection around this particular call.

    Cc: stable@vger.kernel.org # v5.4+
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    Link: https://lore.kernel.org/r/iwlwifi.20200403112332.0f49448c133d.I17fd308bc4a9491859c9b112f4eb5d2c3fc18d7d@changeid
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 +++-----
    1 file changed, 3 insertions(+), 5 deletions(-)

    --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
    +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
    @@ -1184,17 +1184,15 @@ static int iwl_mvm_inactivity_check(stru
    for_each_set_bit(i, &changetid_queues, IWL_MAX_HW_QUEUES)
    iwl_mvm_change_queue_tid(mvm, i);

    + rcu_read_unlock();
    +
    if (free_queue >= 0 && alloc_for_sta != IWL_MVM_INVALID_STA) {
    ret = iwl_mvm_free_inactive_queue(mvm, free_queue, queue_owner,
    alloc_for_sta);
    - if (ret) {
    - rcu_read_unlock();
    + if (ret)
    return ret;
    - }
    }

    - rcu_read_unlock();
    -
    return free_queue;
    }


    \
     
     \ /
      Last update: 2020-07-27 16:25    [W:6.857 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site