]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
staging: rtl8723bs: fix missing transmission lock in rtw_xmit
authorKarthikey D Kadati <karthikey3608@gmail.com>
Sat, 27 Dec 2025 11:33:48 +0000 (17:03 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Jan 2026 12:52:25 +0000 (13:52 +0100)
commit44b225bf0738e7b0644be1cc638871e930ffe1e5
treeed9db9ee81101b46b5004cb669e6442c9408504b
parent20530f561a7bc481889f4ab4f8ee218efcdfb072
staging: rtl8723bs: fix missing transmission lock in rtw_xmit

The packet transmission path in rtw_xmit.c contained TODO comments
indicating a missing lock. This patch implements spin_lock_bh and
spin_unlock_bh around the station attribute update section.

This prevents a potential race condition where station security and
PHY information could be modified on another CPU core during
transmission. The use of _bh variants ensures safety in bottom-half
contexts common in network transmit paths.

Verified that psta is NULL-checked prior to acquisition and that no
double-unlocks occur on the exit path.

Signed-off-by: Karthikey D Kadati <karthikey3608@gmail.com>
Link: https://patch.msgid.link/20251227113348.26272-1-karthikey3608@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_xmit.c