Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74350
b: refs/heads/master
c: c895078
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Nov 29, 2007
1 parent 3b76f76 commit 76de2ae
Show file tree
Hide file tree
Showing 2 changed files with 5 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: c2319540cd7330fa9066e5b9b84d357a2c8631a2
refs/heads/master: c895078355b6b6e05c60aa205892526dd3390f0a
9 changes: 4 additions & 5 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader,
int __user *stat_addr, struct rusage __user *ru)
{
int retval, exit_code;
struct pid_namespace *ns;
pid_t pid;

if (!p->exit_code)
return 0;
Expand All @@ -1376,12 +1376,11 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader,
* keep holding onto the tasklist_lock while we call getrusage and
* possibly take page faults for user memory.
*/
ns = current->nsproxy->pid_ns;
pid = task_pid_nr_ns(p, current->nsproxy->pid_ns);
get_task_struct(p);
read_unlock(&tasklist_lock);

if (unlikely(noreap)) {
pid_t pid = task_pid_nr_ns(p, ns);
uid_t uid = p->uid;
int why = (p->ptrace & PT_PTRACED) ? CLD_TRAPPED : CLD_STOPPED;

Expand Down Expand Up @@ -1451,11 +1450,11 @@ static int wait_task_stopped(struct task_struct *p, int delayed_group_leader,
if (!retval && infop)
retval = put_user(exit_code, &infop->si_status);
if (!retval && infop)
retval = put_user(task_pid_nr_ns(p, ns), &infop->si_pid);
retval = put_user(pid, &infop->si_pid);
if (!retval && infop)
retval = put_user(p->uid, &infop->si_uid);
if (!retval)
retval = task_pid_nr_ns(p, ns);
retval = pid;
put_task_struct(p);

BUG_ON(!retval);
Expand Down

0 comments on commit 76de2ae

Please sign in to comment.