Re: [PATCH 13/16] cgroup_freezer: prepare for removal of TIF_FREEZE
From: Oleg Nesterov
Date: Sun Aug 28 2011 - 13:43:36 EST
Hi Tejun.
Well, yet another sorry for delay ;)
On 08/19, Tejun Heo wrote:
>
> @@ -279,7 +268,6 @@ static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
> struct task_struct *task;
> unsigned int num_cant_freeze_now = 0;
>
> - freezer->state = CGROUP_FREEZING;
...
> @@ -321,6 +307,8 @@ static int freezer_change_state(struct cgroup *cgroup,
> if (goal_state == freezer->state)
> goto out;
>
> + freezer->state = goal_state;
> +
This doesn't look right at all... Unless I misssed something.
A user writes "FROZEN" into the control file, our goal is CGROUP_FROZEN.
But. freezer_change_state() should set CGROUP_FREEZING, not CGROUP_FROZEN.
This cgrp is not frozen yet, _FROZEN should be set by update_if_frozen(),
assuming that the user reads the state waiting until the operation
completes.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/