aboutsummaryrefslogtreecommitdiff
path: root/drivers/message/fusion/lsi/mpi_raid.h
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2013-06-25 11:48:32 -0700
committerTejun Heo <[email protected]>2013-06-26 10:42:46 -0700
commit14611e51a57df10240817d8ada510842faf0ec51 (patch)
treed2b3ba10386a98a867fac435625cee580f9b5047 /drivers/message/fusion/lsi/mpi_raid.h
parenteb178d063324d9c30f673db3877b892a48ade21e (diff)
cgroup: fix RCU accesses to task->cgroups
task->cgroups is a RCU pointer pointing to struct css_set. A task switches to a different css_set on cgroup migration but a css_set doesn't change once created and its pointers to cgroup_subsys_states aren't RCU protected. task_subsys_state[_check]() is the macro to acquire css given a task and subsys_id pair. It RCU-dereferences task->cgroups->subsys[] not task->cgroups, so the RCU pointer task->cgroups ends up being dereferenced without read_barrier_depends() after it. It's broken. Fix it by introducing task_css_set[_check]() which does RCU-dereference on task->cgroups. task_subsys_state[_check]() is reimplemented to directly dereference ->subsys[] of the css_set returned from task_css_set[_check](). This removes some of sparse RCU warnings in cgroup. v2: Fixed unbalanced parenthsis and there's no need to use rcu_dereference_raw() when !CONFIG_PROVE_RCU. Both spotted by Li. Signed-off-by: Tejun Heo <[email protected]> Reported-by: Fengguang Wu <[email protected]> Acked-by: Li Zefan <[email protected]> Cc: [email protected]
Diffstat (limited to 'drivers/message/fusion/lsi/mpi_raid.h')
0 files changed, 0 insertions, 0 deletions