Merge tag 'timers-urgent-2025-11-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Ingo Molnar:

- Fix a race in timer->function clearing in timer_shutdown_sync()

- Fix a timekeeper sysfs-setup resource leak in error paths

- Fix the NOHZ report_idle_softirq() syslog rate-limiting
logic to have no side effects on the return value

* tag 'timers-urgent-2025-11-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
timers: Fix NULL function pointer race in timer_shutdown_sync()
timekeeping: Fix resource leak in tk_aux_sysfs_init() error paths
tick/sched: Fix bogus condition in report_idle_softirq()

Changed files
+21 -18
kernel
+5 -6
kernel/time/tick-sched.c
··· 1152 1152 return false; 1153 1153 } 1154 1154 1155 - if (ratelimit >= 10) 1156 - return false; 1157 - 1158 1155 /* On RT, softirq handling may be waiting on some lock */ 1159 1156 if (local_bh_blocked()) 1160 1157 return false; 1161 1158 1162 - pr_warn("NOHZ tick-stop error: local softirq work is pending, handler #%02x!!!\n", 1163 - pending); 1164 - ratelimit++; 1159 + if (ratelimit < 10) { 1160 + pr_warn("NOHZ tick-stop error: local softirq work is pending, handler #%02x!!!\n", 1161 + pending); 1162 + ratelimit++; 1163 + } 1165 1164 1166 1165 return true; 1167 1166 }
+12 -9
kernel/time/timekeeping.c
··· 3060 3060 static int __init tk_aux_sysfs_init(void) 3061 3061 { 3062 3062 struct kobject *auxo, *tko = kobject_create_and_add("time", kernel_kobj); 3063 + int ret = -ENOMEM; 3063 3064 3064 3065 if (!tko) 3065 - return -ENOMEM; 3066 + return ret; 3066 3067 3067 3068 auxo = kobject_create_and_add("aux_clocks", tko); 3068 - if (!auxo) { 3069 - kobject_put(tko); 3070 - return -ENOMEM; 3071 - } 3069 + if (!auxo) 3070 + goto err_clean; 3072 3071 3073 3072 for (int i = 0; i < MAX_AUX_CLOCKS; i++) { 3074 3073 char id[2] = { [0] = '0' + i, }; 3075 3074 struct kobject *clk = kobject_create_and_add(id, auxo); 3076 3075 3077 3076 if (!clk) 3078 - return -ENOMEM; 3077 + goto err_clean; 3079 3078 3080 - int ret = sysfs_create_group(clk, &aux_clock_enable_attr_group); 3081 - 3079 + ret = sysfs_create_group(clk, &aux_clock_enable_attr_group); 3082 3080 if (ret) 3083 - return ret; 3081 + goto err_clean; 3084 3082 } 3085 3083 return 0; 3084 + 3085 + err_clean: 3086 + kobject_put(auxo); 3087 + kobject_put(tko); 3088 + return ret; 3086 3089 } 3087 3090 late_initcall(tk_aux_sysfs_init); 3088 3091
+4 -3
kernel/time/timer.c
··· 1458 1458 1459 1459 base = lock_timer_base(timer, &flags); 1460 1460 1461 - if (base->running_timer != timer) 1461 + if (base->running_timer != timer) { 1462 1462 ret = detach_if_pending(timer, base, true); 1463 - if (shutdown) 1464 - timer->function = NULL; 1463 + if (shutdown) 1464 + timer->function = NULL; 1465 + } 1465 1466 1466 1467 raw_spin_unlock_irqrestore(&base->lock, flags); 1467 1468