Re: [PATCH 5/7] cgroup_freezer: allow moving tasks in and out of afrozen cgroup
From: Oleg Nesterov
Date: Mon Oct 22 2012 - 15:23:55 EST
Tha last question ;)
On 10/16, Tejun Heo wrote:
> @@ -190,12 +201,12 @@ static void freezer_fork(struct task_struct *task)
> goto out;
> - BUG_ON(freezer->state == CGROUP_FROZEN);
> - /* Locking avoids race with FREEZING -> THAWED transitions. */
> - if (freezer->state == CGROUP_FREEZING)
> + /*
> + * @task might have been just migrated into a FROZEN cgroup.
Confused. If it was migrated, then freezer_attach() should take care
> + * equality with THAWED. Read the comment in freezer_attach().
> + */
> + if (freezer->state != CGROUP_THAWED)
This can only happen in the "normal" case, when a CGROUP_FREEZING task
forks the new child. So we could even do BUG_ON(state = CGROUP_FROZEN).
Or there could be another reason?
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/