lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <19ac11d6b9e5988d190025255c5ffe08c57c8023.1739961770.git.guchongchong@xiaomi.com>
Date: Wed, 19 Feb 2025 18:54:11 +0800
From: Chongchong Gu <chongchonggu21@...il.com>
To: vkoul@...nel.org
Cc: kishon@...nel.org,
	aford173@...il.com,
	linux-phy@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	guchongchong <guchongchong@...omi.com>
Subject: [PATCH v3 1/1] phy: freescale: limit div value in FIELD_PREP()

From: guchongchong <guchongchong@...omi.com>

In fsl_samsung_hdmi_phy_configure_pll_lock_det, the variable named
div becomes 4 after loop. It must less than 4 in function named
FIELD_PREP(REG12_CK_DIV_MASK, div).

A way to reproduce when run the following shell command
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4

Fixes: <d567679f2b6a> ("phy: freescale: fsl-samsung-hdmi: Clean up")
Signed-off-by: guchongchong <guchongchong@...omi.com>
---
 drivers/phy/freescale/phy-fsl-samsung-hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
index 45004f598e4d..0ad766359cbe 100644
--- a/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
+++ b/drivers/phy/freescale/phy-fsl-samsung-hdmi.c
@@ -337,7 +337,7 @@ fsl_samsung_hdmi_phy_configure_pll_lock_det(struct fsl_samsung_hdmi_phy *phy,
 	/* Find int_pllclk speed */
 	for (div = 0; div < 4; div++) {
 		int_pllclk = pclk / (1 << div);
-		if (int_pllclk < (50 * MHZ))
+		if (int_pllclk < (50 * MHZ) || div == 3)
 			break;
 	}
 
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ