Skip to content

Commit

Permalink
mt76: mt7915: fix crash on tx rate report for invalid stations
Browse files Browse the repository at this point in the history
Check wcid RCU pointer before using it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Jul 24, 2020
1 parent b5df0fb commit 8d9a62e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mt7915/mcu.c
Expand Up @@ -522,6 +522,9 @@ mt7915_mcu_tx_rate_report(struct mt7915_dev *dev, struct sk_buff *skb)
return;

wcid = rcu_dereference(dev->mt76.wcid[wcidx]);
if (!wcid)
return;

msta = container_of(wcid, struct mt7915_sta, wcid);
stats = &msta->stats;

Expand Down

0 comments on commit 8d9a62e

Please sign in to comment.