public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] arm_timer: remove a racy and obsolete PF_EXITING check
@ 2006-06-15 16:12 Oleg Nesterov
  2006-06-19  8:06 ` Roland McGrath
  0 siblings, 1 reply; 3+ messages in thread
From: Oleg Nesterov @ 2006-06-15 16:12 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, john stultz
  Cc: Roland McGrath, Thomas Gleixner, Ingo Molnar, Steven Rostedt,
	Chris Wright, linux-kernel

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>

--- 2.6.17-rc6/kernel/posix-cpu-timers.c~3_ARM	2006-06-15 18:46:00.000000000 +0400
+++ 2.6.17-rc6/kernel/posix-cpu-timers.c	2006-06-15 19:04:54.000000000 +0400
@@ -555,9 +555,6 @@ static void arm_timer(struct k_itimer *t
 	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);


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-06-19 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 16:12 [PATCH 3/3] arm_timer: remove a racy and obsolete PF_EXITING check Oleg Nesterov
2006-06-19  8:06 ` Roland McGrath
2006-06-19 23:28   ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox