mt76: add sanity check for a-mpdu rx wcid index
Avoid dereferencing invalid ids Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
237312c5e4
commit
bf5238b25a
@ -644,7 +644,7 @@ mt76_airtime_flush_ampdu(struct mt76_dev *dev)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
wcid_idx = dev->rx_ampdu_status.wcid_idx;
|
wcid_idx = dev->rx_ampdu_status.wcid_idx;
|
||||||
if (dev->rx_ampdu_status.wcid_idx != 0xff)
|
if (wcid_idx < ARRAY_SIZE(dev->wcid))
|
||||||
wcid = rcu_dereference(dev->wcid[wcid_idx]);
|
wcid = rcu_dereference(dev->wcid[wcid_idx]);
|
||||||
else
|
else
|
||||||
wcid = NULL;
|
wcid = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user