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: <20251009155251.102472-15-balamanikandan.gunasundar@microchip.com>
Date: Thu, 9 Oct 2025 21:22:47 +0530
From: Balamanikandan Gunasundar <balamanikandan.gunasundar@...rochip.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
CC: Eugen Hristev <eugen.hristev@...aro.org>, Chas Williams
	<3chas3@...il.com>, Nicolas Ferre <nicolas.ferre@...rochip.com>, "Alexandre
 Belloni" <alexandre.belloni@...tlin.com>, Claudiu Beznea
	<claudiu.beznea@...on.dev>, Balakrishnan Sambath
	<balakrishnan.s@...rochip.com>, Hans Verkuil <hverkuil@...nel.org>, "Ricardo
 Ribalda" <ribalda@...omium.org>, Laurent Pinchart
	<laurent.pinchart+renesas@...asonboard.com>, Jacopo Mondi
	<jacopo.mondi@...asonboard.com>, Daniel Scally
	<dan.scally+renesas@...asonboard.com>, Tomi Valkeinen
	<tomi.valkeinen@...asonboard.com>, <linux-kernel@...r.kernel.org>,
	<linux-media@...r.kernel.org>, <linux-atm-general@...ts.sourceforge.net>,
	<netdev@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>
Subject: [PATCH 14/18] media: microchip-isc: fix histogram state initialization order

From: Balakrishnan Sambath <balakrishnan.s@...rochip.com>

Move hist_stat assignment before profile update to ensure histogram state
is properly set when update_profile triggers register writes. This prevents
race conditions during histogram initialization.

Signed-off-by: Balakrishnan Sambath <balakrishnan.s@...rochip.com>
---
 drivers/media/platform/microchip/microchip-isc-base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c
index 6651be6fcb57..e9f14de7ae32 100644
--- a/drivers/media/platform/microchip/microchip-isc-base.c
+++ b/drivers/media/platform/microchip/microchip-isc-base.c
@@ -275,10 +275,10 @@ static void isc_set_histogram(struct isc_device *isc, bool enable)
 			     ISC_HIS_CTRL_EN);
 		regmap_write(regmap, ISC_INTEN, ISC_INT_HISDONE);
 		ctrls->hist_id = ISC_HIS_CFG_MODE_GR;
+		ctrls->hist_stat = HIST_ENABLED;
 		isc_update_profile(isc);
 		regmap_write(regmap, ISC_CTRLEN, ISC_CTRL_HISREQ);
 
-		ctrls->hist_stat = HIST_ENABLED;
 	} else {
 		regmap_write(regmap, ISC_INTDIS, ISC_INT_HISDONE);
 		regmap_write(regmap, ISC_HIS_CTRL + isc->offsets.his,
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ