[tip: core/urgent] timer: Keep debugobjects state consistent in migrate_timer_list()

From: tip-bot2 for Thomas Gleixner

Date: Tue Aug 18 2026 - 05:04:04 EST


The following commit has been merged into the core/urgent branch of tip:

Commit-ID: c793bbfc4a0a9f5a66978fc91559e9681748dbeb
Gitweb: https://git.kernel.org/tip/c793bbfc4a0a9f5a66978fc91559e9681748dbeb
Author: Thomas Gleixner <tglx@xxxxxxxxxx>
AuthorDate: Tue, 18 Aug 2026 00:14:57 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Tue, 18 Aug 2026 10:51:43 +02:00

timer: Keep debugobjects state consistent in migrate_timer_list()

When timers are migrated away from an offline CPU the debugobjects state
gets corrupted. The timer is accounted as inactive on deletion, but the
enqueue on the alive CPU lacks the activation call.

That used to work, but got broken when the trace point and the debug
objects call got separated. That change missed to fixup
migrate_timer_list().

Add the missing debug_timer_activate() invocation to fix it.

Fixes: dc1e7dc5ac62 ("timer: Move trace point to get proper index")
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
Link: https://patch.msgid.link/87bjb0l7ha.ffs@fw13
---
kernel/time/timer.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 655a8c6..ae9abf1 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -2492,6 +2492,7 @@ static void migrate_timer_list(struct timer_base *new_base, struct hlist_head *h
timer = hlist_entry(head->first, struct timer_list, entry);
detach_timer(timer, false);
timer->flags = (timer->flags & ~TIMER_BASEMASK) | cpu;
+ debug_timer_activate(timer);
internal_add_timer(new_base, timer);
}
}