From nobody Fri Mar 27 01:30:36 2026 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 EC6753793DF for ; Mon, 23 Feb 2026 22:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771884171; cv=none; b=SWg9261xPTeTuzNCpfTJ4QiR0egfEGWUqMq30/weDCrmupc9lAj2IUatoPo1hZB2o4eSbKkPSgYfFxiDu/IOHgPEueR/pTxUuUCA28ZbdHG4BV8jbL999PElpsFCQn6HAnWUJJnQbpwgeElYZQR6y3zvYE9/m8BqLxINch91GCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771884171; c=relaxed/simple; bh=bc05mw0i7gs472XuGzp1/FEhAgd/dPBBMguKFi86Jfc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WKjILK+6iomK+w6s4Fw1rtakahkj9YwTibCvXazf+/XSWn8HrZXw5XvTsnSOSqZ9B4kQZ7Ev72DrqpEidxZsIMzFv3pBi6C5iRJPyiWBjW2iWOQL5f5Rb7cQMWTvSf/EHnGVNZqERfUTG5KJ+FtJ9L7f7ylhSMOJY15FkMYgYG8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=PxCyI3oZ; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="PxCyI3oZ" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1771884168; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=on9JfmNlKlenkFNVsBtq1GjslYxyN91VrFDl2aDiUNA=; b=PxCyI3oZPlz8offAVGjLfyeMrkhjh/9w6nHjpG671nfxGDBs08hU+VyJ9Wk2D3liWoKewF Baxsp11KnrGif2BQROFED9yG2p3/WtgyBCUVVMx3XPxlNGyWOAcB0PxsiIlN8fqlj5ub8O VDOANq+UCpKT53i3MSTVI8rHCnMDOco= From: Bart Van Assche To: Peter Zijlstra Cc: Ingo Molnar , Will Deacon , Boqun Feng , Waiman Long , linux-kernel@vger.kernel.org, Marco Elver , Christoph Hellwig , Steven Rostedt , Nick Desaulniers , Nathan Chancellor , Kees Cook , Jann Horn , Bart Van Assche , Kalle Valo , Johannes Berg , linux-wireless@vger.kernel.org Subject: [PATCH 24/62] net/cw1200: Fix locking in error paths Date: Mon, 23 Feb 2026 14:00:24 -0800 Message-ID: <20260223220102.2158611-25-bart.vanassche@linux.dev> In-Reply-To: <20260223220102.2158611-1-bart.vanassche@linux.dev> References: <20260223220102.2158611-1-bart.vanassche@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Bart Van Assche 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. Cc: Kalle Valo Cc: Johannes Berg Cc: linux-wireless@vger.kernel.org Fixes: a910e4a94f69 ("cw1200: add driver for the ST-E CW1100 & CW1200 WLAN = chipsets") Signed-off-by: Bart Van Assche --- 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 120f0379f81d..84eb15d729c7 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, struc= t 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; } =20 /* 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; }