From: Ping-Ke Shih <pkshih@realtek.com>
To: Josef Schlehofer <pepe.schlehofer@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [PATCH rtw-next v2] wifi: rtw89: debug: fix diag_mac crash
Date: Tue, 24 Nov 2026 00:45:26 +0000 [thread overview]
Message-ID: <b7d530a8568147d3840ca920e8839620@realtek.com> (raw)
In-Reply-To: <20261123103647.50876-1-pepe.schlehofer@gmail.com>
Josef Schlehofer <pepe.schlehofer@gmail.com> wrote:
> Some DIAG_MAC elements start with rules for other HCI types.
> rtw89_mac_diag_iter_all() skips those rules but still updates
> prev_sheet and prev_seq. The first rule matching the device can
> therefore be mistaken for a continuation of the same sequence,
> leaving p_rewind uninitialized. A later sequence transition then
> rewinds the output pointer to an invalid address and can crash the
> kernel.
>
> Update prev_sheet and prev_seq only for rules that are processed.
>
> A walk over the DIAG_MAC rules in linux-firmware 20261019 showed
> unchanged sequence grouping on PCIe and corrected grouping on USB/SDIO.
>
> Tested on RTL8922AU (Cudy BE6500) over USB in AP mode with
> backports 7.2 on Linux 6.18.64 (OpenWrt). Without the fix, the first
> read crashed the kernel. With it, three reads returned 147(41)/86/84
> and traffic kept working.
>
> Fixes: 7bf433c6767f ("wifi: rtw89: debug: add parser to diagnose along DIAG_MAC fw element")
> Cc: stable@vger.kernel.org
> Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
prev parent reply other threads:[~2026-11-24 0:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 10:36 [PATCH rtw-next v2] wifi: rtw89: debug: fix diag_mac crash Josef Schlehofer
2026-11-24 0:45 ` 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=b7d530a8568147d3840ca920e8839620@realtek.com \
--to=pkshih@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pepe.schlehofer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox