sched/core: Fix unserialized r-m-w scribbling stuff
authorPeter Zijlstra <peterz@infradead.org>
Wed, 25 Nov 2015 15:02:07 +0000 (16:02 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 6 Jan 2016 10:01:07 +0000 (11:01 +0100)
commitbe958bdc96f18bc1356177bbb79d46ea0c037b96
treedea9e48ddcca9e6fb5d244485a900bfa5b1391f6
parent570f52412ae9432c56897472791ea8db420cbaf1
sched/core: Fix unserialized r-m-w scribbling stuff

Some of the sched bitfieds (notably sched_reset_on_fork) can be set
on other than current, this can cause the r-m-w to race with other
updates.

Since all the sched bits are serialized by scheduler locks, pull them
in a separate word.

Reported-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: akpm@linux-foundation.org
Cc: hannes@cmpxchg.org
Cc: mhocko@kernel.org
Cc: vdavydov@parallels.com
Link: http://lkml.kernel.org/r/20151125150207.GM11639@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h