From: Ping-Ke Shih <pkshih@realtek.com>
To: Tristan Madani <tristmd@gmail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH v2] wifi: rtw89: add bounds check on firmware mac_id in link lookup
Date: Mon, 20 Apr 2026 05:32:01 +0000 [thread overview]
Message-ID: <28b787a929674c249edec3e2bdbf6872@realtek.com> (raw)
In-Reply-To: <20260415222433.1545305-1-tristmd@gmail.com>
Tristan Madani <tristmd@gmail.com> wrote:
> drivers/net/wireless/realtek/rtw89/core.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/core.h b/drivers/net/wireless/realtek/rtw89/core.h
> index XXXXXXX..XXXXXXX 100644
> --- a/drivers/net/wireless/realtek/rtw89/core.h
> +++ b/drivers/net/wireless/realtek/rtw89/core.h
> @@ -6435,6 +6435,9 @@ static inline struct rtw89_sta_link *
> rtw89_assoc_link_rcu_dereference(struct rtw89_dev *rtwdev, u8 macid)
> {
> + if (macid >= RTW89_MAX_MAC_ID_NUM)
Since this is used by data path, I prefer 'unlikely(macid >= RTW89_MAX_MAC_ID_NUM'.
> + return NULL;
> +
> return rcu_dereference(rtwdev->assoc_link_on_macid[macid]);
> }
prev parent reply other threads:[~2026-04-20 5:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 22:24 [PATCH v2] wifi: rtw89: add bounds check on firmware mac_id in link lookup Tristan Madani
2026-04-20 5:32 ` Ping-Ke Shih [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28b787a929674c249edec3e2bdbf6872@realtek.com \
--to=pkshih@realtek.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=tristmd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.