FAILED: patch "[PATCH] wifi: mt76: mt7603: initialize global station WCID" failed to apply to 6.12-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.12-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 456de496b53ae73e6e3020fec815dbdc88aa7c07
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026101201-cathouse-overhand-5997@gregkh' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 456de496b53ae73e6e3020fec815dbdc88aa7c07 Mon Sep 17 00:00:00 2001
From: Cristian Papa <[email protected]>
Date: Thu, 3 Sep 2026 22:07:02 -0300
Subject: [PATCH] wifi: mt76: mt7603: initialize global station WCID
mt7603 uses a driver-private global station WCID for frames that have neither a station nor a vif, including frames injected through a monitor interface. Unlike the core global WCID initialized by mt76_register_device(), this WCID is published without ever being passed to mt76_wcid_init().
Since commit 0335c034e726 ("wifi: mt76: fix race condition related to checking tx queue fill status"), mt76_tx() queues every such frame on the WCID's tx_pending or tx_offchannel queue and links its tx_list. The first injected frame therefore reaches __skb_queue_tail() with an uninitialized sk_buff_head and dereferences a NULL prev pointer.
Initialize the WCID before publishing it.
The fix was tested on an MT7603 PCIe device. Three wildcard probe requests were injected through a monitor interface. The hardware queue head and tail advanced from 0 to 3 and a second radio captured the third request over the air. No oops or reset occurred. After restoring AP mode, a 150 MB transfer also completed without a reset.
drivers/net/wireless/mediatek/mt76/mt7603/init.c +1 -0
@@ -230,6 +230,7 @@ mt7603_mac_init(struct mt7603_dev *dev)eth_broadcast_addr (bc_addr);mt7603_wtbl_init (dev,MT7603_WTBL_RESERVED ,-1 , bc_addr); +mt76_wcid_init (&dev->global_sta.wcid,0 ); dev->global_sta.wcid.idx =MT7603_WTBL_RESERVED ;rcu_assign_pointer (dev->mt76.wcid[MT7603_WTBL_RESERVED ], &dev->global_sta.wcid);
PATCH 1/1 wifi: mt76: mt7603: initialize global station WCID
commit 456de496b53ae73e6e3020fec815dbdc88aa7c07 upstream.
mt7603 uses a driver-private global station WCID for frames that have neither a station nor a vif, including frames injected through a monitor interface. Unlike the core global WCID initialized by mt76_register_device(), this WCID is published without ever being passed to mt76_wcid_init().
Since commit 0335c034e726 ("wifi: mt76: fix race condition related to checking tx queue fill status"), mt76_tx() queues every such frame on the WCID's tx_pending or tx_offchannel queue and links its tx_list. The first injected frame therefore reaches __skb_queue_tail() with an uninitialized sk_buff_head and dereferences a NULL prev pointer.
Initialize the WCID before publishing it.
The fix was tested on an MT7603 PCIe device. Three wildcard probe requests were injected through a monitor interface. The hardware queue head and tail advanced from 0 to 3 and a second radio captured the third request over the air. No oops or reset occurred. After restoring AP mode, a 150 MB transfer also completed without a reset.
--- drivers/net/wireless/mediatek/mt76/mt7603/init.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/wireless/mediatek/mt76/mt7603/init.c +1 -0
@@ -230,6 +230,7 @@ mt7603_mac_init(struct mt7603_dev *dev)eth_broadcast_addr (bc_addr);mt7603_wtbl_init (dev,MT7603_WTBL_RESERVED ,-1 , bc_addr); +mt76_wcid_init (&dev->global_sta.wcid); dev->global_sta.wcid.idx =MT7603_WTBL_RESERVED ;rcu_assign_pointer (dev->mt76.wcid[MT7603_WTBL_RESERVED ], &dev->global_sta.wcid);
Signature · 1 line
2.47.3
Re: [PATCH 6.12.y] wifi: mt76: mt7603: initialize global station WCID
Quoted 1 line
Initialize the WCID before publishing it.
Queued for 6.12, thanks.
Signature · 2 lines
Thanks, Sasha