mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_tx_check_aggr()
Move the NULL check for 'sta' before dereferencing it to prevent a
possible crash.
Fixes: 44eb173bdd4f ("wifi: mt76: mt7925: add link handling in mt7925_txwi_free")
Signed-off-by: Ming Yen Hsieh <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
d48b221e39
commit
719cda7c9f
+4
-1
@@ -844,11 +844,14 @@ static void mt7925_tx_check_aggr(struct ieee80211_sta *sta, struct sk_buff *skb,
|
||||
bool is_8023;
|
||||
u16 fc, tid;
|
||||
|
||||
if (!sta)
|
||||
return;
|
||||
|
||||
link_sta = rcu_dereference(sta->link[wcid->link_id]);
|
||||
if (!link_sta)
|
||||
return;
|
||||
|
||||
if (!sta || !(link_sta->ht_cap.ht_supported || link_sta->he_cap.has_he))
|
||||
if (!(link_sta->ht_cap.ht_supported || link_sta->he_cap.has_he))
|
||||
return;
|
||||
|
||||
tid = skb->priority & IEEE80211_QOS_CTL_TID_MASK;
|
||||
|
||||
Reference in New Issue
Block a user