Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'timers-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
"Two small fixes for the time(r) subsystem:

- Handle a subtle race between the clocksource watchdog and a
concurrent clocksource watchdog stop/start sequence correctly to
prevent a timer double add bug.

- Fix the file path for the core time namespace file"

* tag 'timers-urgent-2020-02-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
clocksource: Prevent double add_timer_on() for watchdog_timer
MAINTAINERS: Correct path to time namespace source file

+10 -3
+1 -1
MAINTAINERS
··· 13360 13360 F: fs/timerfd.c 13361 13361 F: include/linux/timer* 13362 13362 F: include/linux/time_namespace.h 13363 - F: kernel/time_namespace.c 13363 + F: kernel/time/namespace.c 13364 13364 F: kernel/time/*timer* 13365 13365 13366 13366 POWER MANAGEMENT CORE
+9 -2
kernel/time/clocksource.c
··· 293 293 next_cpu = cpumask_next(raw_smp_processor_id(), cpu_online_mask); 294 294 if (next_cpu >= nr_cpu_ids) 295 295 next_cpu = cpumask_first(cpu_online_mask); 296 - watchdog_timer.expires += WATCHDOG_INTERVAL; 297 - add_timer_on(&watchdog_timer, next_cpu); 296 + 297 + /* 298 + * Arm timer if not already pending: could race with concurrent 299 + * pair clocksource_stop_watchdog() clocksource_start_watchdog(). 300 + */ 301 + if (!timer_pending(&watchdog_timer)) { 302 + watchdog_timer.expires += WATCHDOG_INTERVAL; 303 + add_timer_on(&watchdog_timer, next_cpu); 304 + } 298 305 out: 299 306 spin_unlock(&watchdog_lock); 300 307 }