Re: PANIC in check_process_timers() running 2.6.11-rc2-mm1

From: Alexander Nyberg
Date: Tue Jan 25 2005 - 12:13:13 EST


> 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@xxxxxxxxx>

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;



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/