]> git.baikalelectronics.ru Git - kernel.git/commit
hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()
authorOleg Nesterov <oleg@tv-sign.ru>
Fri, 1 Feb 2008 17:35:31 +0000 (20:35 +0300)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 10 Feb 2008 09:48:03 +0000 (10:48 +0100)
commit68bac83afd7b44db6f75ce67504cd07226c9b286
tree2523182bf1dd501aeef28a2c578d86b95cd90683
parentb65323354a5fee258c25a4c2a0fcf808001eca9c
hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep()

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 3554a1f299f2deb4637611590535fbdbd6ed6de8
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>
kernel/compat.c