
From: Yu Liao <liaoyu15@huawei.com> this help debug timer concurrency. Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com> --- kernel/time/timer.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 351420c23064..851d3e588d1a 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -818,12 +818,20 @@ void init_timer_key(struct timer_list *timer, } EXPORT_SYMBOL(init_timer_key); +static void pr_timer_info(void *info) +{ + struct timer_list *timer = info; + pr_info("CPU %u: pprev:%p next:%p\n", smp_processor_id(), timer->entry.pprev, timer->entry.next); +} static inline void detach_timer(struct timer_list *timer, bool clear_pending) { struct hlist_node *entry = &timer->entry; debug_deactivate(timer); + if (unlikely(entry->next == LIST_POISON2)) + smp_call_function_many(cpu_online_mask, pr_timer_info, timer, 1); + __hlist_del(entry); if (clear_pending) entry->pprev = NULL; -- 2.25.1