rcu read lock should be held when calling and working with task_css_set. This patch also fixes a related lockdep warning. Signed-off-by: Sasha Levin <sasha.levin@xxxxxxxxxx> --- kernel/cgroup.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 8f4ddbe..f638ad6 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -4361,6 +4361,7 @@ void cgroup_exit(struct task_struct *tsk, int run_callbacks) } /* Reassign the task to the init_css_set. */ + rcu_read_lock(); cset = task_css_set(tsk); RCU_INIT_POINTER(tsk->cgroups, &init_css_set); @@ -4378,6 +4379,7 @@ void cgroup_exit(struct task_struct *tsk, int run_callbacks) if (put_cset) put_css_set(cset, true); + rcu_read_unlock(); } static void check_for_release(struct cgroup *cgrp) -- 1.7.2.5 _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/containers