]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: cw1200: Revert "Fix locking in error paths"
authorBart Van Assche <bvanassche@acm.org>
Thu, 30 Apr 2026 17:44:15 +0000 (10:44 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 4 May 2026 07:08:24 +0000 (09:08 +0200)
Revert commit d98c24617a83 ("wifi: cw1200: Fix locking in error paths")
because it introduces a locking bug instead of fixing a locking bug.
cw1200_wow_resume() unlocks priv->conf_mutex. Hence, adding
mutex_unlock(&priv->conf_mutex) just after cw1200_wow_resume() is wrong.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Closes: https://lore.kernel.org/all/408661f69f263266b028713e1412ba36d457e63d.camel@decadent.org.uk/
Fixes: d98c24617a83 ("wifi: cw1200: Fix locking in error paths")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260430174418.1845431-1-bvanassche@acm.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/st/cw1200/pm.c

index 84eb15d729c70da8ed144689622c947db6be645a..120f0379f81dd559f1b00a74234f9489b65cf71b 100644 (file)
@@ -264,14 +264,12 @@ int cw1200_wow_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
                wiphy_err(priv->hw->wiphy,
                          "PM request failed: %d. WoW is disabled.\n", ret);
                cw1200_wow_resume(hw);
-               mutex_unlock(&priv->conf_mutex);
                return -EBUSY;
        }
 
        /* Force resume if event is coming from the device. */
        if (atomic_read(&priv->bh_rx)) {
                cw1200_wow_resume(hw);
-               mutex_unlock(&priv->conf_mutex);
                return -EAGAIN;
        }