hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()
authorOleg Nesterov <oleg@tv-sign.ru>
Tue, 19 Feb 2008 23:48:53 +0000 (00:48 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 26 Feb 2008 00:18:56 +0000 (16:18 -0800)
commit5214a170d6c2f1ff99c0aa9b8ed4be56d55f4ee4
treee7e5906bb82888015c66d91265b512c4dd8014cd
parentab23ae27f48ee940397f7e9bc21c4d3e4eb8391e
hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()

commit 416529374b4793ba2d2e97e736d108a2e0f3ef07

Spotted by Pavel Emelyanov and Alexey Dobriyan.

compat_sys_nanosleep() implicitly uses hrtimer_nanosleep_restart(), this can't
work. Make a suitable compat_nanosleep_restart() helper.

Introduced by commit c70878b4e0b6cf8d2f1e46319e48e821ef4a8aba
hrtimer: hook compat_sys_nanosleep up to high res timer code

Also, set ->addr_limit = KERNEL_DS before doing hrtimer_nanosleep(), this func
was changed by the previous patch and now takes the "__user *" parameter.

Thanks to Ingo Molnar for fixing the bug in this patch.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Pavel Emelyanov <xemul@sw.ru>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Toyo Abe <toyoa@mvista.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/compat.c