kernel/cpu_chill: use schedule_hrtimeout()
If a task calls cpu_chill() and gets woken up by a regular or spurious
wakeup and has a signal pending, then it exits the sleep loop in
do_nanosleep() and sets up the restart block. If restart->nanosleep.type is
not TI_NONE then this results in accessing a stale user pointer from a
previously interrupted syscall and a copy to user based on the stale
pointer or a BUG() when 'type' is not supported in nanosleep_copyout().
Instead all this trouble, use schedule_hrtimeout().
Cc: stable-rt@vger.kernel.org
Signed-off-by:
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Loading
Please sign in to comment