From: Roland McGrath <roland@redhat.com>
To: Alexander Nyberg <alexn@dsv.su.se>
Cc: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: PANIC in check_process_timers() running 2.6.11-rc2-mm1
Date: Tue, 25 Jan 2005 14:09:05 -0800 [thread overview]
Message-ID: <200501252209.j0PM95MX000477@magilla.sf.frob.com> (raw)
In-Reply-To: Alexander Nyberg's message of Tuesday, 25 January 2005 18:06:42 +0100 <1106672802.705.37.camel@boxen>
Thanks for tracking that down. It was intended that such things would not
be possible because getting into that code in the first place should be
ruled out while exiting. That removes the requirement for any special case
check in the common path. But, it was done too late since it hadn't
occurred to me that ->live going zero itself created a problem.
Please try this patch instead of the one you posted. This patch goes on
top of all the patches I posted, and so should apply to -mm1 fine. But
because the context nearby changes a lot in the various patches, this one
won't apply after just the cputimers patch without the succeeding three.
Andrew, if you prefer, I can send a replacement for the cputimers patch
that includes this fix, and replacements for the three later patches that
will apply after that one. If you use this patch, make sure it goes after
the three later patches (itimers and sigxcpu).
Thanks,
Roland
Signed-off-by: Roland McGrath <roland@redhat.com>
--- linux-2.6/kernel/exit.c
+++ linux-2.6/kernel/exit.c
@@ -753,14 +753,6 @@ static void exit_notify(struct task_stru
state = EXIT_DEAD;
tsk->exit_state = state;
- /*
- * Clear these here so that update_process_times() won't try to deliver
- * itimer, profile or rlimit signals to this task while it is in late exit.
- */
- tsk->it_virt_expires = cputime_zero;
- tsk->it_prof_expires = cputime_zero;
- tsk->it_sched_expires = 0;
-
write_unlock_irq(&tasklist_lock);
list_for_each_safe(_p, _n, &ptrace_dead) {
@@ -801,6 +793,14 @@ fastcall NORET_TYPE void do_exit(long co
tsk->flags |= PF_EXITING;
+ /*
+ * Make sure we don't try to process any timer firings
+ * while we are already exiting.
+ */
+ tsk->it_virt_expires = cputime_zero;
+ tsk->it_prof_expires = cputime_zero;
+ tsk->it_sched_expires = 0;
+
if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, current->pid,
next prev parent reply other threads:[~2005-01-25 22:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-25 16:10 Alexander Nyberg
2005-01-25 17:06 ` Alexander Nyberg
2005-01-25 22:09 ` Roland McGrath [this message]
2005-01-25 22:56 ` Alexander Nyberg
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=200501252209.j0PM95MX000477@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@osdl.org \
--cc=alexn@dsv.su.se \
/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
all inboxes | Powered by JetHome®