Skip to content

Commit 52644c9

Browse files
Davidlohr Buesotorvalds
authored andcommitted
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 <dbueso@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a9c5bcf commit 52644c9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎ipc/sem.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops,
19411941
queue.sleeper = current;
19421942

19431943
sleep_again:
1944-
current->state = TASK_INTERRUPTIBLE;
1944+
__set_current_state(TASK_INTERRUPTIBLE);
19451945
sem_unlock(sma, locknum);
19461946
rcu_read_unlock();
19471947

0 commit comments

Comments
 (0)