Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16904
b: refs/heads/master
c: b4b2641
h: refs/heads/master
v: v3
  • Loading branch information
Paul Jackson authored and Linus Torvalds committed Jan 9, 2006
1 parent 2c6707d commit aefba50
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 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: 59dac16fb95f09253b8086134443abeb439703cd
refs/heads/master: b4b2641843db124637fa3d2cb2101982035dcc82
4 changes: 1 addition & 3 deletions trunk/kernel/cpuset.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,15 +1821,13 @@ void cpuset_fork(struct task_struct *child)
*
* We don't need to task_lock() this reference to tsk->cpuset,
* because tsk is already marked PF_EXITING, so attach_task() won't
* mess with it.
* mess with it, or task is a failed fork, never visible to attach_task.
**/

void cpuset_exit(struct task_struct *tsk)
{
struct cpuset *cs;

BUG_ON(!(tsk->flags & PF_EXITING));

cs = tsk->cpuset;
tsk->cpuset = NULL;

Expand Down
6 changes: 4 additions & 2 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -972,12 +972,13 @@ static task_t *copy_process(unsigned long clone_flags,
p->io_context = NULL;
p->io_wait = NULL;
p->audit_context = NULL;
cpuset_fork(p);
#ifdef CONFIG_NUMA
p->mempolicy = mpol_copy(p->mempolicy);
if (IS_ERR(p->mempolicy)) {
retval = PTR_ERR(p->mempolicy);
p->mempolicy = NULL;
goto bad_fork_cleanup;
goto bad_fork_cleanup_cpuset;
}
#endif

Expand Down Expand Up @@ -1148,7 +1149,6 @@ static task_t *copy_process(unsigned long clone_flags,
total_forks++;
write_unlock_irq(&tasklist_lock);
proc_fork_connector(p);
cpuset_fork(p);
retval = 0;

fork_out:
Expand Down Expand Up @@ -1180,7 +1180,9 @@ static task_t *copy_process(unsigned long clone_flags,
bad_fork_cleanup_policy:
#ifdef CONFIG_NUMA
mpol_free(p->mempolicy);
bad_fork_cleanup_cpuset:
#endif
cpuset_exit(p);
bad_fork_cleanup:
if (p->binfmt)
module_put(p->binfmt->module);
Expand Down

0 comments on commit aefba50

Please sign in to comment.