mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/3] ipc,sem: use current->state helpers
@ 2015-01-15  6:59 Davidlohr Bueso
  2015-01-15  6:59 ` [PATCH 2/3] jbd: drop jbd_ENOSYS debug Davidlohr Bueso
  2015-01-15  6:59 ` [PATCH 3/3] signal: use current->state helpers Davidlohr Bueso
  0 siblings, 2 replies; 5+ messages in thread
From: Davidlohr Bueso @ 2015-01-15  6:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Davidlohr Bueso, Davidlohr Bueso

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>
---
 ipc/sem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/sem.c b/ipc/sem.c
index 6115146..9284211 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();
 
-- 
2.1.2


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-15 19:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-15  6:59 [PATCH 1/3] ipc,sem: use current->state helpers Davidlohr Bueso
2015-01-15  6:59 ` [PATCH 2/3] jbd: drop jbd_ENOSYS debug Davidlohr Bueso
2015-01-15  9:34   ` Jan Kara
2015-01-15  6:59 ` [PATCH 3/3] signal: use current->state helpers Davidlohr Bueso
2015-01-15 19:43   ` Oleg Nesterov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®