diff options
author | Liad Kaufman <liad.kaufman@intel.com> | 2016-09-22 15:14:08 +0300 |
---|---|---|
committer | Luca Coelho <luciano.coelho@intel.com> | 2016-10-19 11:30:59 +0300 |
commit | 56214749e0b46eeac6795551f187c0f9443918f2 (patch) | |
tree | e5cf8a2a1f7672fd1571808a14142010a1ef59f8 /drivers/net/wireless/intel | |
parent | 341ca402e42b3c4a8b34341a35f82ff9f7bf8664 (diff) | |
download | linux-stable-56214749e0b46eeac6795551f187c0f9443918f2.tar.gz linux-stable-56214749e0b46eeac6795551f187c0f9443918f2.tar.bz2 linux-stable-56214749e0b46eeac6795551f187c0f9443918f2.zip |
iwlwifi: mvm: fix reserved txq freeing
If a TXQ's marking as a reserved queue is removed,
when removing the STA the driver might try to access
out of bounds memory. Make sure the reserved queue
is freed only if it is still reserved.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index a65030f4019d..c9dcb70cb525 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1494,12 +1494,15 @@ int iwl_mvm_rm_sta(struct iwl_mvm *mvm, ret = iwl_mvm_drain_sta(mvm, mvm_sta, false); /* If DQA is supported - the queues can be disabled now */ - if (iwl_mvm_is_dqa_supported(mvm)) { + if (iwl_mvm_is_dqa_supported(mvm)) + iwl_mvm_disable_sta_queues(mvm, vif, mvm_sta); + + /* If there is a TXQ still marked as reserved - free it */ + if (iwl_mvm_is_dqa_supported(mvm) && + mvm_sta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) { u8 reserved_txq = mvm_sta->reserved_queue; enum iwl_mvm_queue_status *status; - iwl_mvm_disable_sta_queues(mvm, vif, mvm_sta); - /* * If no traffic has gone through the reserved TXQ - it * is still marked as IWL_MVM_QUEUE_RESERVED, and |