From: Thomas Gleixner <tglx@linutronix.de>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org, mingo@elte.hu
Subject: Re: [patch 2/2] hrtimer
Date: Tue, 28 Mar 2006 10:29:33 +0200 [thread overview]
Message-ID: <1143534573.5344.172.camel@localhost.localdomain> (raw)
In-Reply-To: <20060327235530.GA7024@oleg>
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;
prev parent reply other threads:[~2006-03-28 8:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-25 12:46 [patch 0/2] hrtimer: generic sleeper infrastructure Thomas Gleixner
2006-03-25 12:46 ` [patch 1/2] hrtimer Thomas Gleixner
2006-03-25 12:46 ` [patch 2/2] hrtimer Thomas Gleixner
2006-03-26 2:32 ` Andrew Morton
2006-03-26 22:10 ` Thomas Gleixner
2006-03-27 23:55 ` Oleg Nesterov
2006-03-28 0:03 ` Roman Zippel
2006-03-28 8:29 ` Thomas Gleixner [this message]
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=1143534573.5344.172.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
/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