From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796129604; b=z6RHAA5hKtpwEOE4sLtbouR+KRzjlLkIUpo4HmibmVHDAQxP9L4R9iItTMTqnWu40xUR 8JO5lktB7ApoTyrh3xee1a0p4HexC8mePVvE/VuvEXgmfxLLerieq8AmkAnsa8xiRUljm dKZ/cMVHxjJWPSWD17+jNAEZ1PEqw4eMmNgrvPh5n3zIoFER/3yPPL2i4FAFazxRXr+e5 Zp3aiBTvcWUz1jFGJrbT+uEh2J480D0SdXwUI0G4wYHyCZUhdW33GZsin/N5Cf4AIcoiP 4KhMTXk2YrrZVZ9HqXw3bCykXPQCT1W2U6VXMyOV2pnc/0SAIMkxhKGSQB9rtuTs1Aw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796129604; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=Hkrda2FcfOhxuyLvpv7ffKRXRM1EhhtJFRq9hwp5JtU=; b=ctXbqbnqlgfSgn/KOEgPHmdde4X24jd9Ej73EsarkOfNBcit8kKJK17apRtw2gzIP780 wzWHW0kkvFM5v3Vvpdmh6YBq8Q9CFxpTx6CimYyFXzQt4bDaXUxNsa6r5vvyjrqmNidEJ 49f3oS8QJmQnElgiDDtRg6/ilvC0hsSaqyBWO6PPqBPxj9ssznnsIoiYku9cXZgF0Xypz ftzDtRfEJlYoJ120pJancZWrmniFspX/eYk3wwklRnqTofD5zjaPLH6j+MR04mvbWsx3e 3BT/E/vX1ncJWvO67ZXt4hAXylvAuKiojZIFVHrg9RzLY8oFjqNE7E95nc4D0dVELbA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="V/zhE/0O"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49073606A339; Tue, 1 Dec 2026 12:53:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=V/zhE/0O Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9123A1F00899; Tue, 1 Dec 2026 12:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796129603; bh=Hkrda2FcfOhxuyLvpv7ffKRXRM1EhhtJFRq9hwp5JtU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=V/zhE/0OWdFmNLlqaiigyLureywetyZhmmUAvmBe53BttSzU0j8ytPbLkF2plnETs MKAKXjx7UHFT3XrwB0QGe8UyqX7/oXwWXcnxSyWDJ0Z+C6vtpiyhewdnixFbZzDDhN IGTAfoiCNsHHiXd9PNBajQcLfshaBiJcJxCdsYGFRMj3I9qcC6LZbNvLM3nqb1VdMD Wu3QC5DSqK8nAJtB3tffKBLfUGoGh30R4T8JfKRMtK5mX4Ni2p1bSV8DFnL5unGM6T PtjyDXT92whrDwwP0g0sLqcqEfHNItZjgC1+8027M/2mUfqEQG1RIBcZ4z+z5gyAlV BxXc/9tFWSnZA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v16 8/8] arm64: dts: qcom: Add SM7250 devicetree file Reply-To: sashiko-reviews@lists.linux.dev To: "Sreeshankar K" Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261201-sm7250-v16-8-ff2a373e16d3@gmail.com> References: <20261201-sm7250-v16-0-ff2a373e16d3@gmail.com> <20261201-sm7250-v16-8-ff2a373e16d3@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 01 Dec 2026 12:53:23 +0000 X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] cpufreq: qcom-hw: partial init, leak, and UAF in qcom_cpufreq_hw_cpu_init() -- commit 9eb185d5af4636bf5669a2288a3efc15b5e70184 Author: Sreeshankar K arm64: dts: qcom: Add SM7250 devicetree file This commit adds the base devicetree file for the Qualcomm SM7250 SoC, including CPU, PSCI, memory, clock, interrupt, and serial nodes. > diff --git a/arch/arm64/boot/dts/qcom/sm7250.dtsi b/arch/arm64/boot/dts/q= com/sm7250.dtsi > new file mode 100644 > index 0000000000000..a47143c091bb0 > --- /dev/null > +++ b/arch/arm64/boot/dts/qcom/sm7250.dtsi > @@ -0,0 +1,803 @@ [ ... ] > + cpufreq_hw: cpufreq@18323000 { > + compatible =3D "qcom,sm7250-cpufreq-hw", "qcom,cpufreq-hw"; > + reg =3D <0 0x18323000 0 0x1000>, > + <0 0x18325800 0 0x1000>, > + <0 0x18327800 0 0x1000>; > + reg-names =3D "freq-domain0", > + "freq-domain1", > + "freq-domain2"; > + interrupts-extended =3D <&lmh_cluster0 0>, > + <&lmh_cluster1 0>; > + interrupt-names =3D "dcvsh-irq-0", > + "dcvsh-irq-1"; [Severity: Medium] Can defining three frequency domains with only two LMh interrupts leave CPUs 0..6 without cpufreq management and cause a use-after-free on data->policy when the LMh interrupt domains are unavailable (for example, when CONFIG_QCOM_LMH=3Dn)? In qcom_cpufreq_hw_lmh_init(), platform_get_irq_optional(pdev, index) returns -EPROBE_DEFER for domains 0 and 1 when lmh_cluster0 and lmh_cluster1 have not registered their IRQ domains, but returns -ENXIO for domain 2 (CPU 7), which qcom_cpufreq_hw_lmh_init() treats as success: drivers/cpufreq/qcom-cpufreq-hw.c:qcom_cpufreq_hw_cpu_init() { ... data->policy =3D policy; ret =3D qcom_cpufreq_hw_read_lut(cpu_dev, policy); ... return qcom_cpufreq_hw_lmh_init(policy, index); } When qcom_cpufreq_hw_lmh_init() fails for CPUs 0..6, cpufreq_online() frees each failed policy without calling cpufreq_driver->exit(). This leaks policy->freq_table and the dynamic OPPs added by qcom_cpufreq_hw_read_lut(), and leaves qcom_cpufreq.data[0..1].policy pointing to freed memory that qcom_cpufreq_hw_recalc_rate() dereferences. Because CPU 7 succeeds, cpufreq_register_driver() returns 0 instead of propagating -EPROBE_DEFER, leaving CPUs 0..6 permanently unmanaged. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261201-sm7250-v16= -0-ff2a373e16d3@gmail.com?part=3D8