kernel/cgroup/cgroup.c | 5 +++++I believe the out_revert error path of cgroup_can_fork() has a similar issue. Perhaps you may want to put the put_css_set() call in cgroup_css_set_put_fork().
1 file changed, 5 insertions(+)
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index d18c2ef..5ecd706 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -6284,6 +6284,11 @@ void cgroup_cancel_fork(struct task_struct *child,
if (ss->cancel_fork)
ss->cancel_fork(child, kargs->cset);
+ if (!(kargs->flags & CLONE_INTO_CGROUP) &&
+ kargs->cset) {
+ put_css_set(kargs->cset);
+ }
+