From: Davidlohr Bueso Date: Fri, 6 Jun 2014 21:37:44 +0000 (-0700) Subject: ipc,msg: use current->state helpers X-Git-Tag: v3.16-rc1~82^2~4^2~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f75a2f358d840e99212b1828b131e8fe8629ac43;p=platform%2Fkernel%2Flinux-exynos.git ipc,msg: use current->state helpers Call __set_current_state() instead of assigning the new state directly. Signed-off-by: Davidlohr Bueso Signed-off-by: Manfred Spraul Cc: Aswin Chandramouleeswaran Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/ipc/msg.c b/ipc/msg.c index 7ed1ef3..5a8489b 100644 --- a/ipc/msg.c +++ b/ipc/msg.c @@ -227,7 +227,7 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params) static inline void ss_add(struct msg_queue *msq, struct msg_sender *mss) { mss->tsk = current; - current->state = TASK_INTERRUPTIBLE; + __set_current_state(TASK_INTERRUPTIBLE); list_add_tail(&mss->list, &msq->q_senders); } @@ -976,7 +976,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl else msr_d.r_maxsize = bufsz; msr_d.r_msg = ERR_PTR(-EAGAIN); - current->state = TASK_INTERRUPTIBLE; + __set_current_state(TASK_INTERRUPTIBLE); ipc_unlock_object(&msq->q_perm); rcu_read_unlock();