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.

[PATCH] arm_timer: remove a racy and obsolete PF_EXITING check

arm_timer() checks PF_EXITING to prevent BUG_ON(->exit_state)
in run_posix_cpu_timers().

However, for some reason it does so only for CPUCLOCK_PERTHREAD
case (which is imho wrong).

Also, this check is not reliable, PF_EXITING could be set on
another cpu without any locks/barriers just after the check,
so it can't prevent from attaching the timer to the exiting
task.

The previous patch makes this check unneeded.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Oleg Nesterov and committed by
Linus Torvalds
f53ae1dc 30f1e3dd

-3
-3
kernel/posix-cpu-timers.c
··· 555 555 struct cpu_timer_list *next; 556 556 unsigned long i; 557 557 558 - if (CPUCLOCK_PERTHREAD(timer->it_clock) && (p->flags & PF_EXITING)) 559 - return; 560 - 561 558 head = (CPUCLOCK_PERTHREAD(timer->it_clock) ? 562 559 p->cpu_timers : p->signal->cpu_timers); 563 560 head += CPUCLOCK_WHICH(timer->it_clock);