aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup_freezer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c
index e95056954498..7f54d1c42953 100644
--- a/kernel/cgroup_freezer.c
+++ b/kernel/cgroup_freezer.c
@@ -190,8 +190,9 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
190 freezer = task_freezer(task); 190 freezer = task_freezer(task);
191 task_unlock(task); 191 task_unlock(task);
192 192
193 BUG_ON(freezer->state == CGROUP_FROZEN);
194 spin_lock_irq(&freezer->lock); 193 spin_lock_irq(&freezer->lock);
194 BUG_ON(freezer->state == CGROUP_FROZEN);
195
195 /* Locking avoids race with FREEZING -> THAWED transitions. */ 196 /* Locking avoids race with FREEZING -> THAWED transitions. */
196 if (freezer->state == CGROUP_FREEZING) 197 if (freezer->state == CGROUP_FREEZING)
197 freeze_task(task, true); 198 freeze_task(task, true);