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] [day] [month] [year] [list]
Message-ID: <87v7j2hy3r.ffs@tglx>
Date: Sat, 22 Nov 2025 16:43:20 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: kernel test robot <lkp@...el.com>, x86-ml <x86@...nel.org>
Cc: linux-kernel@...r.kernel.org, Frederic Weisbecker <frederic@...nel.org>
Subject: Re: [tip:timers/core] BUILD SUCCESS WITH UNVERIFIED WARNING
 7dec062cfcf27808dbb70a0b231d1a698792743d

On Sat, Nov 22 2025 at 15:20, kernel test robot wrote:

> tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git timers/core
> branch HEAD: 7dec062cfcf27808dbb70a0b231d1a698792743d  timers/migration: Exclude isolated cpus from hierarchy
>
> Unverified Warning (likely false positive, kindly check if interested):
>
>     kernel/time/timer_migration.c:1866 tmigr_setup_groups() error: we previously assumed 'start' could be null (see line 1764)

Yes, the code is prone to that problem, but the two callers do the right
thing. Though this can be simplified.

Thanks

        tglx
---
 kernel/time/timer_migration.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/kernel/time/timer_migration.c
+++ b/kernel/time/timer_migration.c
@@ -1750,12 +1750,12 @@ static void tmigr_connect_child_parent(s
 	trace_tmigr_connect_child_parent(child);
 }
 
-static int tmigr_setup_groups(unsigned int cpu, unsigned int node,
-			      struct tmigr_group *start, bool activate)
+static int tmigr_setup_groups(unsigned int cpu, unsigned int node, struct tmigr_group *start)
 {
 	struct tmigr_group *group, *child, **stack;
 	int i, top = 0, err = 0, start_lvl = 0;
 	bool root_mismatch = false;
+	bool activate = false;
 
 	stack = kcalloc(tmigr_hierarchy_levels, sizeof(*stack), GFP_KERNEL);
 	if (!stack)
@@ -1764,6 +1764,7 @@ static int tmigr_setup_groups(unsigned i
 	if (start) {
 		stack[start->level] = start;
 		start_lvl = start->level + 1;
+		activate = true;
 	}
 
 	if (tmigr_root)
@@ -1893,7 +1894,7 @@ static int tmigr_add_cpu(unsigned int cp
 
 	guard(mutex)(&tmigr_mutex);
 
-	ret = tmigr_setup_groups(cpu, node, NULL, false);
+	ret = tmigr_setup_groups(cpu, node, NULL);
 
 	/* Root has changed? Connect the old one to the new */
 	if (ret >= 0 && old_root && old_root != tmigr_root) {
@@ -1910,7 +1911,7 @@ static int tmigr_add_cpu(unsigned int cp
 		 * otherwise the old root may not be active as expected.
 		 */
 		WARN_ON_ONCE(!per_cpu_ptr(&tmigr_cpu, raw_smp_processor_id())->available);
-		ret = tmigr_setup_groups(-1, old_root->numa_node, old_root, true);
+		ret = tmigr_setup_groups(-1, old_root->numa_node, old_root);
 	}
 
 	return ret;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ