mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 02:26:44 +07:00
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;
|
||||
|
||||
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]);
|
||||
else
|
||||
wcid = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user