Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 55919
b: refs/heads/master
c: 8586899
h: refs/heads/master
i:
  55917: 60d2f51
  55915: e1e1b3a
  55911: 56d7247
  55903: c376a2b
v: v3
  • Loading branch information
Sukadev Bhattiprolu authored and Linus Torvalds committed May 11, 2007
1 parent d0a3879 commit 6c8a026
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 0e29b24aa6b3eb6c161cbb9e42fc20b47e67a7c6
refs/heads/master: 85868995d9d82de5b0de38d695559daddffef893
11 changes: 6 additions & 5 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -956,7 +956,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
unsigned long stack_size,
int __user *parent_tidptr,
int __user *child_tidptr,
int pid)
struct pid *pid)
{
int retval;
struct task_struct *p = NULL;
Expand Down Expand Up @@ -1023,7 +1023,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
p->did_exec = 0;
delayacct_tsk_init(p); /* Must remain after dup_task_struct() */
copy_flags(clone_flags, p);
p->pid = pid;
p->pid = pid_nr(pid);
retval = -EFAULT;
if (clone_flags & CLONE_PARENT_SETTID)
if (put_user(p->pid, parent_tidptr))
Expand Down Expand Up @@ -1261,7 +1261,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
list_add_tail_rcu(&p->tasks, &init_task.tasks);
__get_cpu_var(process_counts)++;
}
attach_pid(p, PIDTYPE_PID, find_pid(p->pid));
attach_pid(p, PIDTYPE_PID, pid);
nr_threads++;
}

Expand Down Expand Up @@ -1325,7 +1325,8 @@ struct task_struct * __cpuinit fork_idle(int cpu)
struct task_struct *task;
struct pt_regs regs;

task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, NULL, 0);
task = copy_process(CLONE_VM, 0, idle_regs(&regs), 0, NULL, NULL,
&init_struct_pid);
if (!IS_ERR(task))
init_idle(task, cpu);

Expand Down Expand Up @@ -1375,7 +1376,7 @@ long do_fork(unsigned long clone_flags,
clone_flags |= CLONE_PTRACE;
}

p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr, nr);
p = copy_process(clone_flags, stack_start, regs, stack_size, parent_tidptr, child_tidptr, pid);
/*
* Do this prior waking up the new thread - the thread pointer
* might get invalid after that point, if the thread exits quickly.
Expand Down

0 comments on commit 6c8a026

Please sign in to comment.