Re: [PATCH 6/7 linux-next] wan: cosa: replace current->state by set_current_state()

From: Sergei Shtylyov
Date: Fri Feb 20 2015 - 14:15:14 EST

On 02/20/2015 09:51 PM, Fabian Frederick wrote:

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

current->state = TASK_RUNNING is replaced by __set_current_state()

You sometimes use __set_current_state() and sometimes set_current_state().

Hello Sergei,

Peter suggested to use __set_current_state() for TASK_RUNNING :

I didn't even question your decisions, I (like Peter) just wanted a more coherent change-log. Thanks to Peter for the explanations though. :-)


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

Suggested-By: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>


WBR, Sergei

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at