[Devel] Re: [PATCH 1/4] cgroup freezer: Fix buggy resume test for tasks frozen with cgroup freezer
Serge E. Hallyn
serue at us.ibm.com
Wed Jun 3 09:05:51 PDT 2009
Quoting Matt Helsley (matthltc at us.ibm.com):
> -int cgroup_frozen(struct task_struct *task)
> +int cgroup_freezing_or_frozen(struct task_struct *task)
> {
> struct freezer *freezer;
> enum freezer_state state;
>
> task_lock(task);
> freezer = task_freezer(task);
> - state = freezer->state;
> + if (!freezer->css.cgroup->parent)
> + state = CGROUP_THAWED; /* root cgroup can't be frozen */
> + else
> + state = freezer->state;
Why do you have to add this special-casing now? I thought
we were already preventing freezing the root cgroup, so
freezer->state should be sane in that case anyway?
> task_unlock(task);
>
> - return state == CGROUP_FROZEN;
> + return (state == CGROUP_FREEZING) || (state == CGROUP_FROZEN);
> }
-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
More information about the Devel
mailing list