mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	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: Re: [PATCH 1/5] hrtimer_nanosleep: use -EINTR, not -ERESTARTNOHAND
Date: Fri, 1 Feb 2008 14:50:28 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.1.00.0802011438020.9204@apollo.tec.linutronix.de> (raw)
In-Reply-To: <20080201133755.GA25620@tv-sign.ru>

On Fri, 1 Feb 2008, Oleg Nesterov wrote:

> 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.

-ERESTARTNOHAND is safe here. We want to restart the timer.

The rmtp problem is separate, but that's addressed by your follow up changes.
 
Thanks,
	tglx

> 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());
> 

  reply	other threads:[~2008-02-01 13:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 13:37 Oleg Nesterov
2008-02-01 13:50 ` Thomas Gleixner [this message]
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=alpine.LFD.1.00.0802011438020.9204@apollo.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --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=oleg@tv-sign.ru \
    --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®