Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218524
b: refs/heads/master
c: 0bdba58
h: refs/heads/master
v: v3
  • Loading branch information
Tomasz Buchert authored and Linus Torvalds committed Oct 28, 2010
1 parent 70077b2 commit ba2d95f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 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: d5de4ddb1bc430289bede76c0d87cabee93f749a
refs/heads/master: 0bdba580ab052a21e3eda2764ed22d9ee962392b
15 changes: 8 additions & 7 deletions trunk/kernel/cgroup_freezer.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,24 +173,25 @@ static int freezer_can_attach(struct cgroup_subsys *ss,

/*
* Anything frozen can't move or be moved to/from.
*
* Since orig_freezer->state == FROZEN means that @task has been
* frozen, so it's sufficient to check the latter condition.
*/

if (is_task_frozen_enough(task))
freezer = cgroup_freezer(new_cgroup);
if (freezer->state != CGROUP_THAWED)
return -EBUSY;

freezer = cgroup_freezer(new_cgroup);
if (freezer->state == CGROUP_FROZEN)
rcu_read_lock();
if (__cgroup_freezing_or_frozen(task)) {
rcu_read_unlock();
return -EBUSY;
}
rcu_read_unlock();

if (threadgroup) {
struct task_struct *c;

rcu_read_lock();
list_for_each_entry_rcu(c, &task->thread_group, thread_group) {
if (is_task_frozen_enough(c)) {
if (__cgroup_freezing_or_frozen(c)) {
rcu_read_unlock();
return -EBUSY;
}
Expand Down

0 comments on commit ba2d95f

Please sign in to comment.