Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273238
b: refs/heads/master
c: 33ef6b6
h: refs/heads/master
v: v3
  • Loading branch information
Ben Blum authored and Linus Torvalds committed Nov 2, 2011
1 parent a5a2f17 commit d4a30d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 434a964daa14b9db083ce20404a4a2add54d037a
refs/heads/master: 33ef6b6984403a688189317ef46bb3caab3b70e0
6 changes: 3 additions & 3 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,7 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
goto out_free_group_list;

/* prevent changes to the threadgroup list while we take a snapshot. */
rcu_read_lock();
read_lock(&tasklist_lock);
if (!thread_group_leader(leader)) {
/*
* a race with de_thread from another thread's exec() may strip
Expand All @@ -2036,7 +2036,7 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
* throw this task away and try again (from cgroup_procs_write);
* this is "double-double-toil-and-trouble-check locking".
*/
rcu_read_unlock();
read_unlock(&tasklist_lock);
retval = -EAGAIN;
goto out_free_group_list;
}
Expand All @@ -2057,7 +2057,7 @@ int cgroup_attach_proc(struct cgroup *cgrp, struct task_struct *leader)
} while_each_thread(leader, tsk);
/* remember the number of threads in the array for later. */
group_size = i;
rcu_read_unlock();
read_unlock(&tasklist_lock);

/*
* step 1: check that we can legitimately attach to the cgroup.
Expand Down

0 comments on commit d4a30d9

Please sign in to comment.