]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: rtw89: pci: validate release report content before using for RTL8922DE
authorPing-Ke Shih <pkshih@realtek.com>
Fri, 23 Jan 2026 01:39:56 +0000 (09:39 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Wed, 28 Jan 2026 03:20:47 +0000 (11:20 +0800)
The commit 957eda596c76
("wifi: rtw89: pci: validate sequence number of TX release report")
does validation on existing chips, which somehow a release report of SKB
becomes malformed. As no clear cause found, add rules ahead for RTL8922DE
to avoid crash if it happens.

Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260123013957.16418-11-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/pci.c

index 093960d7279f8ffe727a84ecf2f5e81ef41048b7..b8135cf15d13c4864e93508ddbefe985f8898b51 100644 (file)
@@ -604,8 +604,10 @@ static void rtw89_pci_release_rpp(struct rtw89_dev *rtwdev, void *rpp)
 
        info->parse_rpp(rtwdev, rpp, &rpp_info);
 
-       if (unlikely(rpp_info.txch == RTW89_TXCH_CH12)) {
-               rtw89_warn(rtwdev, "should no fwcmd release report\n");
+       if (unlikely(rpp_info.txch >= RTW89_TXCH_NUM ||
+                    info->tx_dma_ch_mask & BIT(rpp_info.txch))) {
+               rtw89_warn(rtwdev, "should no release report on txch %d\n",
+                          rpp_info.txch);
                return;
        }