summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorErik Stromdahl <erik.stromdahl@gmail.com>2018-09-14 19:00:34 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-10-02 10:56:29 +0300
commita5ae326418b353301c6acc787a8988782e1762f6 (patch)
tree4963e8be5b0dc515fed1817c14fbd7f80ab13192 /net/mac80211
parent6762696429bbc4b2e1b6e5996c3d99da8bbc627d (diff)
downloadlinux-a5ae326418b353301c6acc787a8988782e1762f6.tar.xz
mac80211: fix issue with possible txq NULL pointer
Drivers that do not have the BUFF_MMPDU_TXQ flag set will not have a TXQ for the special TID = 16. In this case, the last member in the *struct ieee80211_sta* txq array will be NULL. We must check this in order not to get a NULL pointer dereference when iterating the txq array. Signed-off-by: Erik Stromdahl <erik.stromdahl@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 36a3c2ada515..ef5d1f60a63b 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -264,6 +264,9 @@ static void __ieee80211_wake_txqs(struct ieee80211_sub_if_data *sdata, int ac)
for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
struct ieee80211_txq *txq = sta->sta.txq[i];
+ if (!txq)
+ continue;
+
txqi = to_txq_info(txq);
if (ac != txq->ac)