From: Oleg Nesterov <oleg@tv-sign.ru>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
john stultz <johnstul@us.ibm.com>
Cc: Roland McGrath <roland@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
Steven Rostedt <rostedt@goodmis.org>,
Chris Wright <chrisw@osdl.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] arm_timer: remove a racy and obsolete PF_EXITING check
Date: Thu, 15 Jun 2006 20:12:02 +0400 [thread overview]
Message-ID: <20060615161202.GA21463@oleg> (raw)
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);
next reply other threads:[~2006-06-15 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-15 16:12 Oleg Nesterov [this message]
2006-06-19 8:06 ` [PATCH 3/3] arm_timer: remove a racy and obsolete PF_EXITING check Roland McGrath
2006-06-19 23:28 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060615161202.GA21463@oleg \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=chrisw@osdl.org \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=roland@redhat.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox