All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: kernel test robot <lkp@intel.com>, x86-ml <x86@kernel.org>
Cc: linux-kernel@vger.kernel.org, Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [tip:timers/core] BUILD SUCCESS WITH UNVERIFIED WARNING 7dec062cfcf27808dbb70a0b231d1a698792743d
Date: Sat, 22 Nov 2025 16:43:20 +0100	[thread overview]
Message-ID: <87v7j2hy3r.ffs@tglx> (raw)
In-Reply-To: <202511221509.FrXNMjDM-lkp@intel.com>

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;


      reply	other threads:[~2025-11-22 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-22  7:20 [tip:timers/core] BUILD SUCCESS WITH UNVERIFIED WARNING 7dec062cfcf27808dbb70a0b231d1a698792743d kernel test robot
2025-11-22 15:43 ` Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v7j2hy3r.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.