• Oleg Nesterov's avatar
    hrtimer: fix *rmtp/restarts handling in compat_sys_nanosleep() · 41652937
    Oleg Nesterov authored
    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 c70878b4
    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: default avatarOleg 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: default avatarThomas Gleixner <tglx@linutronix.de>
    41652937
compat.c 27.4 KB