From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Alexey Dobriyan <adobriyan@sw.ru>, Ingo Molnar <mingo@elte.hu>,
Pavel Emelyanov <xemul@sw.ru>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] hrtimer_nanosleep: use -EINTR, not -ERESTARTNOHAND
Date: Fri, 1 Feb 2008 16:37:55 +0300 [thread overview]
Message-ID: <20080201133755.GA25620@tv-sign.ru> (raw)
hrtimer_nanosleep:
/* Absolute timers do not update the rmtp value and restart: */
return -ERESTARTNOHAND;
This is not right, -ERESTARTNOHAND means we will do restart if there is no
in fact pending signal, and worse, this restart will use the same unchanged
"__user *rmtp" parameter.
Use -EINTR instead.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- MM/kernel/hrtimer.c~HRT_RMTP~ 2008-01-27 17:07:39.000000000 +0300
+++ MM/kernel/hrtimer.c~HRT_RMTP 2008-02-01 13:43:52.000000000 +0300
@@ -1359,7 +1359,7 @@ long hrtimer_nanosleep(struct timespec *
/* Absolute timers do not update the rmtp value and restart: */
if (mode == HRTIMER_MODE_ABS)
- return -ERESTARTNOHAND;
+ return -EINTR;
if (rmtp) {
rem = ktime_sub(t.timer.expires, t.timer.base->get_time());
next reply other threads:[~2008-02-01 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-01 13:37 Oleg Nesterov [this message]
2008-02-01 13:50 ` Thomas Gleixner
2008-02-01 14:20 ` Oleg Nesterov
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=20080201133755.GA25620@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=a.p.zijlstra@chello.nl \
--cc=adobriyan@sw.ru \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=xemul@sw.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
all inboxes | Powered by JetHome®