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 2C0B7494A0E; Sat, 28 Feb 2026 17:44:52 +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=1772300693; cv=none; b=eE15PdVniMU21aQuECUWrfb86YGJjI4sr7mSsGDwpUFvuJ2oO00IBeb8YoTt0GeDBxd8MOpn5MDCKnnv9RuCEOPCezjUWtB5pGTvz8FUni9DodlUBy6H1YtWlTFLn21pOMgMRx7fRTB0zpCMOqb0jcQJ9OseqrbN4oXR+X5KrRM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772300693; c=relaxed/simple; bh=Mu0YetehpSMSEnsfyji6J7/9tlJ/cVtHgFo5QB5cRj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=izYEfXMAp1Y4/bu2OPlXQsG5ZS4B/e1i+P+bqvM9/M11C83/nMWgkodWIGhMD3Wu2VEMoqkdZ+t/GHXV+5ref2wQHtl0L0M+uFGM8EGEBX9Z8L6YwAQlS9tXv79i3EeA1ZTk3OiMqTqD85d+o7u41kDxpiTqYfYu1G5ZKYLb+ec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eM73i+I5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eM73i+I5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18A9CC19424; Sat, 28 Feb 2026 17:44:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772300692; bh=Mu0YetehpSMSEnsfyji6J7/9tlJ/cVtHgFo5QB5cRj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eM73i+I5iGFEhJf2UGlNArUWyhZZDmU7okKhp1j9z2Dfp4kmv520HOEFX98Vqyft/ azWMhdxV59BOaqKnQyR0eRjx0KF5RT4y7OsG4MlCHusy4mIs+i4o3tTDBRv1WnnNmT /tYOg8yyR2o1GYsMIjiIJ+BcCdoX+ESY6OUt4rS9Nlb4AT9owPDDr+xgDL/gLFgoUK E71nBhzqFMFVpJbgSLGmJ0F0+UmEIm304pb6MbsUt1UzP+hGli1BEU4DygBvUofgoL gVrjq7+inC1wrzcA05pPRyM/mpVF99DgH838ldjghVxDowTF9tBF6RSQDYUHTkZWnl 17YBmMIQmnsQg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Marek Vasut , Geert Uytterhoeven , Stephen Boyd , Sasha Levin Subject: [PATCH 6.19 728/844] clk: rs9: Reserve 8 struct clk_hw slots for for 9FGV0841 Date: Sat, 28 Feb 2026 12:30:41 -0500 Message-ID: <20260228173244.1509663-729-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260228173244.1509663-1-sashal@kernel.org> References: <20260228173244.1509663-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Marek Vasut [ Upstream commit 5ec820fc28d0b8a0f3890d476b1976f20e8343cc ] The 9FGV0841 has 8 outputs and registers 8 struct clk_hw, make sure there are 8 slots for those newly registered clk_hw pointers, else there is going to be out of bounds write when pointers 4..7 are set into struct rs9_driver_data .clk_dif[4..7] field. Since there are other structure members past this struct clk_hw pointer array, writing to .clk_dif[4..7] fields corrupts both the struct rs9_driver_data content and data around it, sometimes without crashing the kernel. However, the kernel does surely crash when the driver is unbound or during suspend. Fix this, increase the struct clk_hw pointer array size to the maximum output count of 9FGV0841, which is the biggest chip that is supported by this driver. Cc: stable@vger.kernel.org Fixes: f0e5e1800204 ("clk: rs9: Add support for 9FGV0841") Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/CAMuHMdVyQpOBT+Ho+mXY07fndFN9bKJdaaWGn91WOFnnYErLyg@mail.gmail.com Signed-off-by: Marek Vasut Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/clk-renesas-pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c index 4c3a5e4eb77ac..f94a9c4d0b670 100644 --- a/drivers/clk/clk-renesas-pcie.c +++ b/drivers/clk/clk-renesas-pcie.c @@ -64,7 +64,7 @@ struct rs9_driver_data { struct i2c_client *client; struct regmap *regmap; const struct rs9_chip_info *chip_info; - struct clk_hw *clk_dif[4]; + struct clk_hw *clk_dif[8]; u8 pll_amplitude; u8 pll_ssc; u8 clk_dif_sr; -- 2.51.0