Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118905
b: refs/heads/master
c: 6874467
h: refs/heads/master
i:
  118903: 404bb1e
v: v3
  • Loading branch information
Li Zefan authored and Linus Torvalds committed Nov 13, 2008
1 parent 9897b95 commit c86c22b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0bcb6069a6e1af5c114a2a8873ec43ada8933596
refs/heads/master: 687446760bd008df96655cb8c5900f8e48a7118c
8 changes: 6 additions & 2 deletions trunk/kernel/cgroup_freezer.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,13 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
{
struct freezer *freezer;

task_lock(task);
/*
* No lock is needed, since the task isn't on tasklist yet,
* so it can't be moved to another cgroup, which means the
* freezer won't be removed and will be valid during this
* function call.
*/
freezer = task_freezer(task);
task_unlock(task);

spin_lock_irq(&freezer->lock);
BUG_ON(freezer->state == CGROUP_FROZEN);
Expand Down

0 comments on commit c86c22b

Please sign in to comment.