Commit 72a0d273 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Tiejun Chen
Browse files

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: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
parent 624cabac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment