All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Nyberg <alexn@dsv.su.se>
To: roland@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: PANIC in check_process_timers() running 2.6.11-rc2-mm1
Date: Tue, 25 Jan 2005 18:06:42 +0100	[thread overview]
Message-ID: <1106672802.705.37.camel@boxen> (raw)
In-Reply-To: <1106669452.705.29.camel@boxen>

> Hi Roland
> 
> Just got this running LTP-20050107 on 2.6.11-rc2-mm1, haven't looked
> further yet. Box is i386 UP with preempt, I'm putting dmesg at the 
> bottom of mail.


It's possible that the last refcount of signal->live is dropped in
do_exit and we're interrupted by the timer leaving nthreads to 0.
Takes a few tries to hit but not impossible, this fixes it for me.


Signed-off-by: Alexander Nyberg <alexn@dsv.su.se>

Index: linux-2.6.10/kernel/posix-cpu-timers.c
===================================================================
--- linux-2.6.10.orig/kernel/posix-cpu-timers.c	2005-01-25 17:40:22.000000000 +0100
+++ linux-2.6.10/kernel/posix-cpu-timers.c	2005-01-25 17:43:15.000000000 +0100
@@ -1132,6 +1132,13 @@
 		unsigned long long sched_left, sched;
 		const unsigned int nthreads = atomic_read(&sig->live);
 
+		/*
+		 * We interrupted do_exit and the refcount has dropped,
+		 * leave the task to exit
+		 */
+		if (nthreads == 0)
+			return;
+
 		prof_left = cputime_sub(prof_expires,
 					cputime_add(utime, stime)) / nthreads;
 		virt_left = cputime_sub(virt_expires, utime) / nthreads;




  reply	other threads:[~2005-01-25 17:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-25 16:10 PANIC in check_process_timers() running 2.6.11-rc2-mm1 Alexander Nyberg
2005-01-25 17:06 ` Alexander Nyberg [this message]
2005-01-25 22:09   ` Roland McGrath
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=1106672802.705.37.camel@boxen \
    --to=alexn@dsv.su.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.