From: Davidlohr Bueso Date: Tue, 17 Feb 2015 21:47:55 +0000 (-0800) Subject: ipc,sem: use current->state helpers X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=52644c9ab3faefbfbf07a19c24c4e74e33cfd796;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ipc,sem: use current->state helpers Call __set_current_state() instead of assigning the new state directly. These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping track of who changed the state. Signed-off-by: Davidlohr Bueso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/sem.c b/ipc/sem.c index 6115146563f9..92842113c6a9 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -1941,7 +1941,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, queue.sleeper = current; sleep_again: - current->state = TASK_INTERRUPTIBLE; + __set_current_state(TASK_INTERRUPTIBLE); sem_unlock(sma, locknum); rcu_read_unlock();