rtlwifi: rtl8723be: Fix potential race condition
authorLarry Finger <Larry.Finger@lwfinger.net>
Sat, 25 Jun 2016 18:37:45 +0000 (13:37 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 5 Jul 2016 14:31:43 +0000 (17:31 +0300)
commit31c2e76c77fba56bd52d704802dd63aafabd5320
tree844232454b2f608beffe815c0ebb5e8fce75dade
parentc3ae8ec4a26468f4b1a0b329ca9f57d19be32be8
rtlwifi: rtl8723be: Fix potential race condition

Flag rfchange_inprogress in struct rtl_ps_ctl is protected by a spinlock
in most routines but not in rtl8723be_dm_watchdog(), which could
lead to a race condition. The necessary locking to prevent this condition
is added.

Reported-by: Pavel Andrianov <andrianov@ispras.ru>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Pavel Andrianov <andrianov@ispras.ru>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c