[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080201143514.GA25855@tv-sign.ru>
Date: Fri, 1 Feb 2008 17:35:14 +0300
From: Oleg Nesterov <oleg@...sign.ru>
To: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>
Cc: Alexey Dobriyan <adobriyan@...ru>, Ingo Molnar <mingo@...e.hu>,
Pavel Emelyanov <xemul@...ru>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Toyo Abe <toyoa@...sta.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] compat_sys_clock_nanosleep: fix *rmtp handling for -EINTR case
Andrew, please ignore this patch.
It is wrong for the same reason as "PATCH 1/5".
Oleg.
On 02/01, Oleg Nesterov wrote:
>
> COMPLETELY UNTESTED.
>
> compat_sys_clock_nanosleep() update rmtp only if err == -ERESTART_RESTARTBLOCK.
> This is wrong, nanosleep() can return -EINTR if flags & TIMER_ABSTIME.
>
> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
>
> --- MM/kernel/compat.c~4_COMPAT_CLOCK 2008-02-01 14:50:01.000000000 +0300
> +++ MM/kernel/compat.c 2008-02-01 15:05:28.000000000 +0300
> @@ -618,8 +618,7 @@ static long compat_clock_nanosleep_resta
> err = clock_nanosleep_restart(restart);
> set_fs(oldfs);
>
> - if ((err == -ERESTART_RESTARTBLOCK) && rmtp &&
> - put_compat_timespec(&tu, rmtp))
> + if (err && rmtp && put_compat_timespec(&tu, rmtp))
> return -EFAULT;
>
> if (err == -ERESTART_RESTARTBLOCK) {
> @@ -648,8 +647,7 @@ long compat_sys_clock_nanosleep(clockid_
> (struct timespec __user *) &out);
> set_fs(oldfs);
>
> - if ((err == -ERESTART_RESTARTBLOCK) && rmtp &&
> - put_compat_timespec(&out, rmtp))
> + if (err && rmtp && put_compat_timespec(&out, rmtp))
> return -EFAULT;
>
> if (err == -ERESTART_RESTARTBLOCK) {
--
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