]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
mt76: mt7915: fix crash on tx rate report for invalid stations
authorFelix Fietkau <nbd@nbd.name>
Fri, 24 Jul 2020 14:13:10 +0000 (16:13 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 24 Sep 2020 16:10:13 +0000 (18:10 +0200)
Check wcid RCU pointer before using it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c

index 67ac33bc495172f3755daff91d50da924ce9b68d..f8f715b30c0bbcd82a38816364e2a67d7a328687 100644 (file)
@@ -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;