projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
237312c
)
mt76: add sanity check for a-mpdu rx wcid index
author
Felix Fietkau
<nbd@nbd.name>
Thu, 10 Oct 2019 19:59:46 +0000
(21:59 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Wed, 20 Nov 2019 12:23:50 +0000
(13:23 +0100)
Avoid dereferencing invalid ids
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/mediatek/mt76/mac80211.c
b/drivers/net/wireless/mediatek/mt76/mac80211.c
index
4e6f14c
..
a3975e3
100644
(file)
--- a/
drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/
drivers/net/wireless/mediatek/mt76/mac80211.c
@@
-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;