powerpc/pmac: replace current->state by set_current_state()
authorFabian Frederick <fabf@skynet.be>
Fri, 20 Feb 2015 18:12:53 +0000 (19:12 +0100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 25 Mar 2015 05:53:28 +0000 (16:53 +1100)
commit111fbc68fd895ba437bcb03d5dcc4dd21bc61df8
treee1d46889e5888dc4c9ef8da7b96bffd14355cf08
parent1f8c82ab1b0bc7e24601c0fca411fd27b9c883ef
powerpc/pmac: replace current->state by set_current_state()

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

current->state = TASK_RUNNING can be replaced by __set_current_state()

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>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
drivers/macintosh/via-pmu.c