Re: [PATCH v4 5/6] clone3: allow spawning processes into cgroups

Oleg Nesterov
2020-01-20T15:39:30Z

On 01/17, Christian Brauner wrote:
>
> +static int cgroup_css_set_fork(struct task_struct *parent,
> + struct kernel_clone_args *kargs)
...
> + kargs->cset = find_css_set(cset, dst_cgrp);
> + if (!kargs->cset) {
> + ret = -ENOMEM;
> + goto err;
> + }
> +
> + if (cgroup_is_dead(dst_cgrp)) {
> + ret = -ENODEV;
> + goto err;
^^^^^^^^

this looks wrong... don't we need put_css_set(kargs->cset) before "goto err" ?

Oleg.