lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 1 Feb 2008 14:50:28 +0100 (CET)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Oleg Nesterov <oleg@...sign.ru>
cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Alexey Dobriyan <adobriyan@...ru>, Ingo Molnar <mingo@...e.hu>,
	Pavel Emelyanov <xemul@...ru>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] hrtimer_nanosleep: use -EINTR, not -ERESTARTNOHAND

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@...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());
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ