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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250723020326.622368-1-zhangqiao22@huawei.com>
Date: Wed, 23 Jul 2025 10:03:26 +0800
From: Zhang Qiao <zhangqiao22@...wei.com>
To: <tglx@...utronix.de>, <frederic@...nel.org>, <anna-maria@...utronix.de>,
	<jstultz@...gle.com>, <peterz@...radead.org>, <namcao@...utronix.de>
CC: <linux-kernel@...r.kernel.org>, <zhangqiao22@...wei.com>,
	<yuanlulu4@...wei.com>, <tanghui20@...wei.com>
Subject: [PATCH] sched/clock: Init generic clock with CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y

The sched_clock_timer is used to prevent the sched clock wrapped, this
timer is initialized in generic_sched_clock_init();

When CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y, generic_sched_clock_init() is
not called and sched_clock_timer is not initialized, causing the
sched clock to wrap.

To fix this issue, call generic_sched_clock_init() in sched_clock_init()
to initialize the sched_clock_timer.

Fixes: 5d2a4e91a541 ("sched/clock: Move sched clock initialization and merge with generic clock")
Reported-by: yuanlulu <yuanlulu4@...wei.com>
Signed-off-by: Zhang Qiao <zhangqiao22@...wei.com>
---
 kernel/sched/clock.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c
index a09655b481402..13e76cfb59f23 100644
--- a/kernel/sched/clock.c
+++ b/kernel/sched/clock.c
@@ -213,6 +213,7 @@ void __init sched_clock_init(void)
 	 */
 	local_irq_disable();
 	__sched_clock_gtod_offset();
+	generic_sched_clock_init();
 	local_irq_enable();
 
 	static_branch_inc(&sched_clock_running);
-- 
2.18.0.huawei.25


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ