diff options
author | zhangyue <zhangyue1@kylinos.cn> | 2021-12-08 10:53:41 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2021-12-15 15:28:26 +0100 |
commit | 4d375c2e51d5b3227683e3a9a198a2f003959c76 (patch) | |
tree | 3cca515ec517b75fbc94ca2822effd07d966971f /drivers/net/wireless/rsi | |
parent | wilc1000: Rename workqueue from "WILC_wq" to "NETDEV-wq" (diff) | |
download | linux-4d375c2e51d5b3227683e3a9a198a2f003959c76.tar.xz linux-4d375c2e51d5b3227683e3a9a198a2f003959c76.zip |
rsi: fix array out of bound
Limit the max of 'ii'. If 'ii' greater than or
equal to 'RSI_MAX_VIFS', the array 'adapter->vifs'
may be out of bound
Signed-off-by: zhangyue <zhangyue1@kylinos.cn>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20211208095341.47777-1-zhangyue1@kylinos.cn
Diffstat (limited to 'drivers/net/wireless/rsi')
-rw-r--r-- | drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index e70c1c7fdf59..913e11fb3807 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -1108,6 +1108,9 @@ static int rsi_mac80211_ampdu_action(struct ieee80211_hw *hw, break; } + if (ii >= RSI_MAX_VIFS) + return status; + mutex_lock(&common->mutex); if (ssn != NULL) |