All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1 net-next] net/atm/signaling.c: replace current->state by  __set_current_state()
@ 2015-02-23 17:31 Fabian Frederick
  2015-02-23 17:50 ` chas williams - CONTRACTOR
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Frederick @ 2015-02-23 17:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: davem, Peter Zijlstra, Fabian Frederick, netdev

Use helper functions to access current->state.
Direct assignments are prone to races and therefore buggy.

Thanks to Peter Zijlstra for the exact definition of the problem.

Suggested-By: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 net/atm/signaling.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/atm/signaling.c b/net/atm/signaling.c
index 523bce7..0140832 100644
--- a/net/atm/signaling.c
+++ b/net/atm/signaling.c
@@ -40,7 +40,7 @@ static void sigd_put_skb(struct sk_buff *skb)
 		pr_debug("atmsvc: waiting for signaling daemon...\n");
 		schedule();
 	}
-	current->state = TASK_RUNNING;
+	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&sigd_sleep, &wait);
 #else
 	if (!sigd) {
-- 
2.1.0


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

end of thread, other threads:[~2015-02-23 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 17:31 [PATCH 1/1 net-next] net/atm/signaling.c: replace current->state by __set_current_state() Fabian Frederick
2015-02-23 17:50 ` chas williams - CONTRACTOR
2015-02-23 22:20   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.