mirror of https://github.com/torvalds/linux.git
Miscellaneous fixes:
- 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
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-----BEGIN PGP SIGNATURE-----
iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmkivgERHG1pbmdvQGtl
cm5lbC5vcmcACgkQEnMQ0APhK1i/0g/+ODFR6NF7cNcsZPhKdRt/A9Il72qmjteG
Fqzacev1rzaQpPSaRpOnEAnqDRmfnFLZ0I4WA36QJxfApHHg9kI8GzEaa7WDvQOc
kOL317i3vsme+tolI0fwazvMRnwgSipHVvXp76eyaEKXHM97i81XUpJYynxl+j9R
0le8wpcBQKMUnpvYWN4J7u0AOO0vXCdaKSM2r9bgecXGyaqgzdyLYqGhgPLd0tYC
Tn3pSrQIffORZQed3hKjXmC4DSs+tsdQr1npphxrzHy3Q8rXbt3eEj96IYyHdz1f
/3eetSWRcd0jnZYIjuA9xG7xMSBBitkPBzSQMaZMdzV2d03oPU2WVvoKLSPnFNxz
JQIErExLJH2AOrYNLmx+6DJ0Ql8398KdISJnb6HdX1cZcljRKmqlo9BIaPorQDqf
WFm8WvhthBXHwEbWx/ecaPkV2aBQpXTTH7AkCebBLF+YTxtHUVGjwlBQ/CltABk3
a4U93M/Zdyaxys/9YpIeWAsg0y3b54r6aFbReyt8CiMVe+gKqTOnT3Jy4hqFZPnB
x+AHtooGsN7CIV4q9NIB6EmvJ5J1HFkmGQrWo1y/OHbZp2mDJy/1sQ+rj7NXdBZA
ibrUHIWzTtZ6WpuR1ABD3wubhb7/BF3Gwh4v27AUtLFKW/cZq7ovMODVrp+Svt6X
3EOg/YofAy0=
=JVik
-----END PGP SIGNATURE-----
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()
This commit is contained in:
commit
1af5c1d3a9
|
|
@ -1152,16 +1152,15 @@ static bool report_idle_softirq(void)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (ratelimit >= 10)
|
||||
return false;
|
||||
|
||||
/* On RT, softirq handling may be waiting on some lock */
|
||||
if (local_bh_blocked())
|
||||
return false;
|
||||
|
||||
pr_warn("NOHZ tick-stop error: local softirq work is pending, handler #%02x!!!\n",
|
||||
pending);
|
||||
ratelimit++;
|
||||
if (ratelimit < 10) {
|
||||
pr_warn("NOHZ tick-stop error: local softirq work is pending, handler #%02x!!!\n",
|
||||
pending);
|
||||
ratelimit++;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3060,29 +3060,32 @@ static const struct attribute_group aux_clock_enable_attr_group = {
|
|||
static int __init tk_aux_sysfs_init(void)
|
||||
{
|
||||
struct kobject *auxo, *tko = kobject_create_and_add("time", kernel_kobj);
|
||||
int ret = -ENOMEM;
|
||||
|
||||
if (!tko)
|
||||
return -ENOMEM;
|
||||
return ret;
|
||||
|
||||
auxo = kobject_create_and_add("aux_clocks", tko);
|
||||
if (!auxo) {
|
||||
kobject_put(tko);
|
||||
return -ENOMEM;
|
||||
}
|
||||
if (!auxo)
|
||||
goto err_clean;
|
||||
|
||||
for (int i = 0; i < MAX_AUX_CLOCKS; i++) {
|
||||
char id[2] = { [0] = '0' + i, };
|
||||
struct kobject *clk = kobject_create_and_add(id, auxo);
|
||||
|
||||
if (!clk)
|
||||
return -ENOMEM;
|
||||
|
||||
int ret = sysfs_create_group(clk, &aux_clock_enable_attr_group);
|
||||
goto err_clean;
|
||||
|
||||
ret = sysfs_create_group(clk, &aux_clock_enable_attr_group);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_clean;
|
||||
}
|
||||
return 0;
|
||||
|
||||
err_clean:
|
||||
kobject_put(auxo);
|
||||
kobject_put(tko);
|
||||
return ret;
|
||||
}
|
||||
late_initcall(tk_aux_sysfs_init);
|
||||
|
||||
|
|
|
|||
|
|
@ -1458,10 +1458,11 @@ static int __try_to_del_timer_sync(struct timer_list *timer, bool shutdown)
|
|||
|
||||
base = lock_timer_base(timer, &flags);
|
||||
|
||||
if (base->running_timer != timer)
|
||||
if (base->running_timer != timer) {
|
||||
ret = detach_if_pending(timer, base, true);
|
||||
if (shutdown)
|
||||
timer->function = NULL;
|
||||
if (shutdown)
|
||||
timer->function = NULL;
|
||||
}
|
||||
|
||||
raw_spin_unlock_irqrestore(&base->lock, flags);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue