Skip to content

Commit

Permalink
[PATCH] arm_timer: remove a racy and obsolete PF_EXITING check
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Jun 17, 2006
1 parent 30f1e3d commit f53ae1d
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions kernel/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,6 @@ static void arm_timer(struct k_itimer *timer, union cpu_time_count now)
struct cpu_timer_list *next;
unsigned long i;

if (CPUCLOCK_PERTHREAD(timer->it_clock) && (p->flags & PF_EXITING))
return;

head = (CPUCLOCK_PERTHREAD(timer->it_clock) ?
p->cpu_timers : p->signal->cpu_timers);
head += CPUCLOCK_WHICH(timer->it_clock);
Expand Down

0 comments on commit f53ae1d

Please sign in to comment.