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 E4D5D1DE4E0; Mon, 23 Mar 2026 14:58:59 +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=1774277940; cv=none; b=Wngz1FmaXPAJPEFuq/8eLJCrqlLWK/aLfck+5Fm15BELVGtOvyKZwbBq9jlp8hiyBiyPNiSY8ErLfqdypdWgteFLuN5TyAmAGQKq9c9TBI5qMkqp44/XywZaly3y2mFXaX1roAWIvH8Z0UPYaMLOgoAilJFun48fGv3UtY2hYmM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774277940; c=relaxed/simple; bh=yw9FYCoa4uI+Ugmt3n3tD8h71+4PkFmRTSGJ+7G0L3M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=keP9lxl72KH7enDUfLTZdL6Yx43wHI50BQvfeeTFpufAjh9ZIKZR4uXivHvcyZO30IrS/iYZ9hS+/eieQmN2hma/WzC8aAbuBpsVT5FUFTPHfJA6SUIZQm192ilhchqMDY21D15aw043Q4bP0s/anuW3LfnGhQpq5jDogzJBuTI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KJDC6xtb; 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="KJDC6xtb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E8F7C4CEF7; Mon, 23 Mar 2026 14:58:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774277939; bh=yw9FYCoa4uI+Ugmt3n3tD8h71+4PkFmRTSGJ+7G0L3M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KJDC6xtbqB6QPUm720jDaaxm/AkdK10Q6ClqgKfAFUXLWU3FkTyRkECFA53Cz3ncZ oXcQi8RsBHNffDLZxup+y0FYX1zWc8IuRPgsH0uqqXq5rrraCjBlCCesTR4dpwgRz1 DE4trLwKq6qkNkOB10711Mq+UJ9WZX1XCJLTx9kU= 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.6 151/567] wifi: cw1200: Fix locking in error paths Date: Mon, 23 Mar 2026 14:41:11 +0100 Message-ID: <20260323134537.569863704@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134533.749096647@linuxfoundation.org> References: <20260323134533.749096647@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.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Bart Van Assche [ Upstream commit d98c24617a831e92e7224a07dcaed2dd0b02af96 ] cw1200_wow_suspend() must only return with priv->conf_mutex locked if it returns zero. This mutex must be unlocked if an error is returned. Add mutex_unlock() calls to the error paths from which that call is missing. This has been detected by the Clang thread-safety analyzer. Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN chipsets") Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20260223220102.2158611-25-bart.vanassche@linux.dev Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/st/cw1200/pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/st/cw1200/pm.c b/drivers/net/wireless/st/cw1200/pm.c index a20ab577a3644..212b6f2af8de4 100644 --- a/drivers/net/wireless/st/cw1200/pm.c +++ b/drivers/net/wireless/st/cw1200/pm.c @@ -264,12 +264,14 @@ 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; } -- 2.51.0