* [PATCH] wifi: rtw89: debug: fix off-by-one in rtw89_ppdu_str()
@ 2026-08-17 6:41 Linkai Gong
2026-08-18 0:24 ` Ping-Ke Shih
0 siblings, 1 reply; 2+ messages in thread
From: Linkai Gong @ 2026-08-17 6:41 UTC (permalink / raw)
To: Ping-Ke Shih
Cc: Kuan-Chung Chen, linux-wireless, linux-kernel, Linkai Gong,
stable
rtw89_ppdu_str() uses type > ARRAY_SIZE(), so type == ARRAY_SIZE() still
indexes one past rtw89_ppdu_infos[]. Compare with >=, like
rtw89_txcmd_str().
Fixes: 419ed7f4a053 ("wifi: rtw89: debug: extend bb_info with TX status and PER")
Cc: stable@vger.kernel.org
Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
---
drivers/net/wireless/realtek/rtw89/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/debug.c b/drivers/net/wireless/realtek/rtw89/debug.c
index 8f5af873e09f..5786120602ab 100644
--- a/drivers/net/wireless/realtek/rtw89/debug.c
+++ b/drivers/net/wireless/realtek/rtw89/debug.c
@@ -4348,7 +4348,7 @@ static const char *rtw89_ppdu_str(struct rtw89_dev *rtwdev, u8 type, u8 subtype)
const struct rtw89_chip_info *chip = rtwdev->chip;
const struct rtw89_ppdu_info *ppdu_info;
- if (type > ARRAY_SIZE(rtw89_ppdu_infos))
+ if (type >= ARRAY_SIZE(rtw89_ppdu_infos))
return "RSVD";
ppdu_info = &rtw89_ppdu_infos[type];
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] wifi: rtw89: debug: fix off-by-one in rtw89_ppdu_str()
2026-08-17 6:41 [PATCH] wifi: rtw89: debug: fix off-by-one in rtw89_ppdu_str() Linkai Gong
@ 2026-08-18 0:24 ` Ping-Ke Shih
0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2026-08-18 0:24 UTC (permalink / raw)
To: Linkai Gong
Cc: Damon Chen, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Linkai Gong <gonglinkai@kylinos.cn> wrote:
> rtw89_ppdu_str() uses type > ARRAY_SIZE(), so type == ARRAY_SIZE() still
> indexes one past rtw89_ppdu_infos[]. Compare with >=, like
> rtw89_txcmd_str().
>
> Fixes: 419ed7f4a053 ("wifi: rtw89: debug: extend bb_info with TX status and PER")
> Cc: stable@vger.kernel.org
> Signed-off-by: Linkai Gong <gonglinkai@kylinos.cn>
The same patch [1] was applied.
[1] https://lore.kernel.org/linux-wireless/aia25i0ds3B6QF6c@stanley.mountain/#t
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-18 0:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 6:41 [PATCH] wifi: rtw89: debug: fix off-by-one in rtw89_ppdu_str() Linkai Gong
2026-08-18 0:24 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox