* [PATCH] rsi: fix array out of bound
@ 2021-12-08 9:53 zhangyue
2021-12-15 14:28 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: zhangyue @ 2021-12-08 9:53 UTC (permalink / raw)
To: amitkarwar, siva8118, kvalo, davem, kuba
Cc: linux-wireless, netdev, linux-kernel
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>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 +++
1 file changed, 3 insertions(+)
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)
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rsi: fix array out of bound
2021-12-08 9:53 [PATCH] rsi: fix array out of bound zhangyue
@ 2021-12-15 14:28 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-12-15 14:28 UTC (permalink / raw)
To: zhangyue
Cc: amitkarwar, siva8118, kvalo, davem, kuba, linux-wireless, netdev,
linux-kernel
zhangyue <zhangyue1@kylinos.cn> wrote:
> 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>
Patch applied to wireless-drivers-next.git, thanks.
4d375c2e51d5 rsi: fix array out of bound
--
https://patchwork.kernel.org/project/linux-wireless/patch/20211208095341.47777-1-zhangyue1@kylinos.cn/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-15 14:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 9:53 [PATCH] rsi: fix array out of bound zhangyue
2021-12-15 14:28 ` Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.