wifi: rtl8xxxu: Fix use after rcu_read_unlock in rtl8xxxu_bss_info_changed
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Mon, 21 Nov 2022 20:56:58 +0000 (22:56 +0200)
committerKalle Valo <kvalo@kernel.org>
Mon, 28 Nov 2022 13:57:07 +0000 (15:57 +0200)
commit7927afb5e27baac694f585b59c436ba323528dc2
tree69df9b9064b1088ada4ed207a5f22e14a59999d1
parent895b3b06efc285c1245242e9638b9ae251dc13ec
wifi: rtl8xxxu: Fix use after rcu_read_unlock in rtl8xxxu_bss_info_changed

Commit a8b5aef2cca1 ("wifi: rtl8xxxu: gen2: Enable 40 MHz channel width")
introduced a line where the pointer returned by ieee80211_find_sta() is
used after rcu_read_unlock().

Move rcu_read_unlock() a bit lower to fix this.

Fixes: a8b5aef2cca1 ("wifi: rtl8xxxu: gen2: Enable 40 MHz channel width")
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/3c82ad09-7593-3be1-1d2c-e58505fb43cb@gmail.com
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c