aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/notifier.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-06-08 05:40:42 -0400
committerIngo Molnar <mingo@elte.hu>2010-06-08 12:44:04 -0400
commitdc61b1d65e353d638b2445f71fb8e5b5630f2415 (patch)
tree07d79b2d385a380207cd889ac764b57190421fd1 /kernel/notifier.c
parent3975d16760d4be7402d1067c548c30c427971331 (diff)
sched: Fix PROVE_RCU vs cpu_cgroup
PROVE_RCU has a few issues with the cpu_cgroup because the scheduler typically holds rq->lock around the css rcu derefs but the generic cgroup code doesn't (and can't) know about that lock. Provide means to add extra checks to the css dereference and use that in the scheduler to annotate its users. The addition of rq->lock to these checks is correct because the cgroup_subsys::attach() method takes the rq->lock for each task it moves, therefore by holding that lock, we ensure the task is pinned to the current cgroup and the RCU derefence is valid. That leaves one genuine race in __sched_setscheduler() where we used task_group() without holding any of the required locks and thus raced with the cgroup code. Solve this by moving the check under the appropriate lock. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/notifier.c')
0 files changed, 0 insertions, 0 deletions