diff --git a/[refs] b/[refs] index dc4ffdd9cbae..91ecaf25ddc7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7d3b56ba37a95f1f370f50258ed3954c304c524b +refs/heads/master: 7b574b7b0124ed344911f5d581e9bc2d83bbeb19 diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 48348dde6d81..891a84eb9d30 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -2945,7 +2945,11 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys, parent = task_cgroup(tsk, subsys->subsys_id); /* Pin the hierarchy */ - atomic_inc(&parent->root->sb->s_active); + if (!atomic_inc_not_zero(&parent->root->sb->s_active)) { + /* We race with the final deactivate_super() */ + mutex_unlock(&cgroup_mutex); + return 0; + } /* Keep the cgroup alive */ get_css_set(cg);