mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
wifi: wlcore: Fix a locking bug
Make sure that wl->mutex is locked before it is unlocked. This has been
detected by the Clang thread-safety analyzer.
Fixes: 45aa7f071b ("wlcore: Use generic runtime pm calls for wowlan elp configuration")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260223220102.2158611-26-bart.vanassche@linux.dev
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
d98c24617a
commit
72c6df8f28
|
|
@ -1875,6 +1875,8 @@ static int __maybe_unused wl1271_op_resume(struct ieee80211_hw *hw)
|
|||
wl->wow_enabled);
|
||||
WARN_ON(!wl->wow_enabled);
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
ret = pm_runtime_force_resume(wl->dev);
|
||||
if (ret < 0) {
|
||||
wl1271_error("ELP wakeup failure!");
|
||||
|
|
@ -1891,8 +1893,6 @@ static int __maybe_unused wl1271_op_resume(struct ieee80211_hw *hw)
|
|||
run_irq_work = true;
|
||||
spin_unlock_irqrestore(&wl->wl_lock, flags);
|
||||
|
||||
mutex_lock(&wl->mutex);
|
||||
|
||||
/* test the recovery flag before calling any SDIO functions */
|
||||
pending_recovery = test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS,
|
||||
&wl->flags);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user