From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDE122D2491; Thu, 12 Mar 2026 20:25:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773347108; cv=none; b=i0FuZJeafE+Av7vHPN5U5Wn+t+0dIhKace6KZaieRSQu91YAMfjUajsGzKRbPbj8X6UbZwwVpOO0tQfa2E3ndg2Z7iLAtwOZfP5p+S30amcLnCtLGJoc7maszobTV2WlmqBPjmbvzrkp3j3RITw07qUFztIhhP1WpFf1XK/U2LY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773347108; c=relaxed/simple; bh=ljHG3XMCDGWNzwn/bX4BDF7Wo/IvzY9nqSp02814tnA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oKAUnpA51IyaA0MZHHUu5a8a7M6W5agRxIDXjEqHRe2pAFH4Bzb0oWWSXyXdRGisBoKLPwxfsk0gHKk4lm47W3Ckf4z6RQxlnz52grksBBJJPyMbZpoIS1C4SkIpSsw++751GAKtA5GLAz1Ynml60azpi79aRpNzCe4bmIFB3mQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=AaS/Ai6S; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="AaS/Ai6S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 598A2C19425; Thu, 12 Mar 2026 20:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773347108; bh=ljHG3XMCDGWNzwn/bX4BDF7Wo/IvzY9nqSp02814tnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AaS/Ai6SxSo4Z8gX7HtL1jFGO8k0Xg80KfAyECQiHZCYNeg9VqfX6sH63zqhqfcgs vU2cagPxpHOpHeAb/dq/UHq+hf5Ik26YnbmTikY2DyBc4y5OubSi6fa+GTxoSiFmGe jzMg3OzW0niLBSr60LMhmm9WmGtuilguXNNDVFi0= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bart Van Assche , Johannes Berg , Sasha Levin Subject: [PATCH 6.12 206/265] wifi: wlcore: Fix a locking bug Date: Thu, 12 Mar 2026 21:09:53 +0100 Message-ID: <20260312201025.762616105@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260312201018.128816016@linuxfoundation.org> References: <20260312201018.128816016@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bart Van Assche [ Upstream commit 72c6df8f284b3a49812ce2ac136727ace70acc7c ] Make sure that wl->mutex is locked before it is unlocked. This has been detected by the Clang thread-safety analyzer. Fixes: 45aa7f071b06 ("wlcore: Use generic runtime pm calls for wowlan elp configuration") Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20260223220102.2158611-26-bart.vanassche@linux.dev Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/ti/wlcore/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 42805ed7ca120..da6db99b0d575 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -1879,6 +1879,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!"); @@ -1895,8 +1897,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); -- 2.51.0