Re: [patch 2/2] hrtimer
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Tue, 28 Mar 2006 10:29:33 +0200
On Tue, 2006-03-28 at 03:55 +0400, Oleg Nesterov wrote:
Instead of exit(), 'task' can go to TASK_STOPPED or TASK_UNINTERRUPTIBLE
after return from do_nanosleep(), it will be awakened by hrtimer_wakeup()
unexpectedly.
Yep, you are right.
Index: linux-2.6.16/kernel/hrtimer.c
===================================================================
--- linux-2.6.16.orig/kernel/hrtimer.c
+++ linux-2.6.16/kernel/hrtimer.c
@@ -684,10 +684,9 @@ static int __sched do_nanosleep(struct h
schedule();
- if (unlikely(t->task)) {
- hrtimer_cancel(&t->timer);
- mode = HRTIMER_ABS;
- }
+ hrtimer_cancel(&t->timer);
+ mode = HRTIMER_ABS;
+
} while (t->task && !signal_pending(current));
return t->task == NULL;
-
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/
- References:
- [patch 0/2] hrtimer: generic sleeper infrastructure
- From: Thomas Gleixner
- [patch 2/2] hrtimer
- From: Thomas Gleixner
- Re: [patch 2/2] hrtimer
- From: Andrew Morton
- Re: [patch 2/2] hrtimer
- From: Thomas Gleixner
- Re: [patch 2/2] hrtimer
- From: Oleg Nesterov
- [patch 0/2] hrtimer: generic sleeper infrastructure
- Prev by Date: Re: HZ != 1000 causes problem with serial device shown by git-bisect
- Next by Date: Re: hda-intel woes
- Previous by thread: Re: [patch 2/2] hrtimer
- Next by thread: [patch 1/2] hrtimer
- Index(es):