summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <dave@stgolabs.net>2015-02-17 22:47:55 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-17 23:34:55 +0100
commit52644c9ab3faefbfbf07a19c24c4e74e33cfd796 (patch)
tree655044797aac54d771597565ca424acad1e2dec5 /ipc/sem.c
parentscripts/gdb: disable pagination while printing from breakpoint handler (diff)
downloadlinux-52644c9ab3faefbfbf07a19c24c4e74e33cfd796.tar.xz
linux-52644c9ab3faefbfbf07a19c24c4e74e33cfd796.zip
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>
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c2
1 files changed, 1 insertions, 1 deletions
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();