]> git.ipfire.org Git - thirdparty/linux.git/commit
wifi: rtw89: splice C2H events queue to local to prevent racing
authorPing-Ke Shih <pkshih@realtek.com>
Tue, 21 Oct 2025 13:33:55 +0000 (21:33 +0800)
committerPing-Ke Shih <pkshih@realtek.com>
Tue, 28 Oct 2025 01:45:35 +0000 (09:45 +0800)
commitb47d748110fd2c2911b59b169b10cc14fd5d3648
tree2100310873a94cd6f0cb9538ece840f8b0b1977e
parent9b567039e540705c5cf0f39a3344086b6f51b3dd
wifi: rtw89: splice C2H events queue to local to prevent racing

RX task enqueues C2H events and fork a C2H work to handle events, but
the work uses skb_queue_walk_safe() without a lock causing potential
racing. Use skb_queue_splice() and its friends with spin_lock to splice
the queue to local, and then still use skb_queue_walk_safe() to iterate
all events.

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