Commit 06bc6f6e authored by Johannes Berg's avatar Johannes Berg Committed by Luca Coelho

iwlwifi: mvm: synchronize TID queue removal

When we mark a TID as no longer having a queue, there's no
guarantee the TX path isn't using this txq_id right now,
having accessed it just before we reset the value. To fix
this, add synchronize_net() when we change the TIDs from
having a queue to not having one, so that we can then be
sure that the TX path is no longer accessing that queue.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 41c4588b
...@@ -545,6 +545,16 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue) ...@@ -545,6 +545,16 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue)
rcu_read_unlock(); rcu_read_unlock();
/*
* The TX path may have been using this TXQ_ID from the tid_data,
* so make sure it's no longer running so that we can safely reuse
* this TXQ later. We've set all the TIDs to IWL_MVM_INVALID_QUEUE
* above, but nothing guarantees we've stopped using them. Thus,
* without this, we could get to iwl_mvm_disable_txq() and remove
* the queue while still sending frames to it.
*/
synchronize_net();
return disable_agg_tids; return disable_agg_tids;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment