From nobody Mon Feb 9 13:06:44 2026 Received: from mail-oa1-f44.google.com (mail-oa1-f44.google.com [209.85.160.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4BDC36CDF8 for ; Mon, 2 Feb 2026 14:41:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770043318; cv=none; b=llBfq+kkTcD64MJqkvsVi3abC1fjqDCK4Tw+qmwTy9WDSrBnmm2awLLmblDaN7FQwjbkbdDfJHXy5rfQOkMXal6qsc/5+dt2NCWmR0InXVayWd68iIpyYgMnYU6p7nUfUK6KKuZDT0IlXwIdSRHy8Jub31l4Oe9R7Ffdmx3d/Xg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770043318; c=relaxed/simple; bh=ppiGxlbdaO3TtRcUR1+uqk+7lpQH3+fQXd+VdH3ZT7I=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=u6xX080KxHTpou3V8pxMmbxN8vdA83yRQmniwhsaW+Sf7ClPqRCnyrYx+M6xO/FevPVjOeLXTnWRwG+sdUfCTaUqPcSidmzUItC9X/ufA4frVvRZFFbBEjBRN0c17WADMwbRTiDZwTWbjj+4biKWydG9JYtIcon38REvO1sLs8w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu; spf=pass smtp.mailfrom=u.northwestern.edu; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b=1P7JPrbf; arc=none smtp.client-ip=209.85.160.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b="1P7JPrbf" Received: by mail-oa1-f44.google.com with SMTP id 586e51a60fabf-40959ad00f2so3140908fac.3 for ; Mon, 02 Feb 2026 06:41:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1770043315; x=1770648115; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=SFjq9aAeRjc0PSnbKDuPDlU/if8jiceONd+riFvEGA0=; b=1P7JPrbf+fL5aD/wSyAr02V7q3bCqwlL/fORfqX5+Ucw/DeMsXY8VbjteKE0f6P8jg 8dTi1hUo702GypNVDuEgWW+0CqSZREl1++ueIcyWjB5fxrYDBMmzUYdpGkvghOeqbu7y Y19OBOkgTWROZEwc2auKR0hLFHKLY8rGrxaeR+vr83goqBvRGnIuxLB4JSoJ+WoxeRxc jyisTFmq2BMJelra09gjfr1Uc8wO9j+hUB0e0xyvvVGNQxzA/wJOWNXLWjySdbcKcSHT kSRSPUP9sAV3BXzZDKYwGkcE5+zUd0yTu9IjUfMKUpTzwCoijkmsBB4NkNSAkSWmXDzQ Sbfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770043315; x=1770648115; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SFjq9aAeRjc0PSnbKDuPDlU/if8jiceONd+riFvEGA0=; b=gK1f1br9uN9FJxIDSddcJQBlfrjR6Y5YWug/kQ7qhPUhfVEhUQJfkMm1SKB3gAXvYs oLfIxs8K9IJCb2xhDq44q2kpPGRbtyeiLisAz0WTUBQcml4uoenA14UjVQZR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94a:b0:409:4570:aa63 with SMTP id 586e51a60fabf-409a6f93c01mr5041635fac.49.1770043315570; Mon, 02 Feb 2026 06:41:55 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id 586e51a60fabf-4095749f332sm11235976fac.11.2026.02.02.06.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 06:41:55 -0800 (PST) From: Ziyi Guo To: Simon Trimmer , Charles Keepax , Richard Fitzgerald Cc: patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH v2] firmware: cs_dsp: fix missing pwr_lock in cs_dsp_stop() Date: Mon, 2 Feb 2026 14:41:53 +0000 Message-Id: <20260202144153.1668326-1-n7l8m4@u.northwestern.edu> X-Mailer: git-send-email 2.34.1 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 Content-Type: text/plain; charset="utf-8" cs_dsp_signal_event_controls() calls cs_dsp_coeff_write_acked_control() which has lockdep_assert_held(&dsp->pwr_lock), but the lock is not held. cs_dsp_signal_event_controls() is invoked from cs_dsp_stop(). Put mutex_lock() at the top of cs_dsp_stop() to fix the missing lock protection, also align with cs_dsp_run(). Signed-off-by: Ziyi Guo Reviewed-by: Richard Fitzgerald --- v2: - Put mutex_lock() at the top of cs_dsp_stop() to fix and align with cs_ds= p_run() drivers/firmware/cirrus/cs_dsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_= dsp.c index 525ac0f0a75d..a491e89c0c97 100644 --- a/drivers/firmware/cirrus/cs_dsp.c +++ b/drivers/firmware/cirrus/cs_dsp.c @@ -2864,6 +2864,8 @@ EXPORT_SYMBOL_NS_GPL(cs_dsp_run, "FW_CS_DSP"); */ void cs_dsp_stop(struct cs_dsp *dsp) { + mutex_lock(&dsp->pwr_lock); + /* Tell the firmware to cleanup */ cs_dsp_signal_event_controls(dsp, CS_DSP_FW_EVENT_SHUTDOWN); =20 @@ -2874,7 +2876,6 @@ void cs_dsp_stop(struct cs_dsp *dsp) if (dsp->ops->show_fw_status) dsp->ops->show_fw_status(dsp); =20 - mutex_lock(&dsp->pwr_lock); =20 if (dsp->client_ops->pre_stop) dsp->client_ops->pre_stop(dsp); --=20 2.34.1