{"push_id":687268220,"size":1,"distinct_size":1,"ref":"refs/heads/lollipop_staging","head":"f74ca194196db417ae6b90496cc65a82e9de457b","before":"393fabade9ae869659ffe9e92a6397ebcadd6e18","commits":[{"sha":"f74ca194196db417ae6b90496cc65a82e9de457b","author":{"email":"546b05909706652891a87f7bfe385ae147f61f91@kernel.org","name":"Tejun Heo"},"message":"cgroup: fix RCU accesses to task->cgroups\n\ncommit 14611e51a57df10240817d8ada510842faf0ec51 upstream.\n\ntask->cgroups is a RCU pointer pointing to struct css_set.  A task\nswitches to a different css_set on cgroup migration but a css_set\ndoesn't change once created and its pointers to cgroup_subsys_states\naren't RCU protected.\n\ntask_subsys_state[_check]() is the macro to acquire css given a task\nand subsys_id pair.  It RCU-dereferences task->cgroups->subsys[] not\ntask->cgroups, so the RCU pointer task->cgroups ends up being\ndereferenced without read_barrier_depends() after it.  It's broken.\n\nFix it by introducing task_css_set[_check]() which does\nRCU-dereference on task->cgroups.  task_subsys_state[_check]() is\nreimplemented to directly dereference ->subsys[] of the css_set\nreturned from task_css_set[_check]().\n\nThis removes some of sparse RCU warnings in cgroup.\n\nv2: Fixed unbalanced parenthsis and there's no need to use\n    rcu_dereference_raw() when !CONFIG_PROVE_RCU.  Both spotted by Li.\n\nSigned-off-by: Tejun Heo <tj@kernel.org>\nReported-by: Fengguang Wu <fengguang.wu@intel.com>\nAcked-by: Li Zefan <lizefan@huawei.com>\n[bwh: Backported to 3.2:\n - Adjust context\n - Remove CONFIG_PROVE_RCU condition\n - s/lockdep_is_held(&cgroup_mutex)/cgroup_lock_is_held()/]\nSigned-off-by: Ben Hutchings <ben@decadent.org.uk>\nCc: Qiang Huang <h.huangqiang@huawei.com>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>","distinct":true,"url":"https://api.github.com/repos/Starship-Android/android_kernel_lge_hammerhead-starship/commits/f74ca194196db417ae6b90496cc65a82e9de457b"}]}