Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127617
b: refs/heads/master
c: 61bce0f
h: refs/heads/master
i:
  127615: 364791c
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Jan 8, 2009
1 parent 784c3b6 commit 575dd22
Show file tree
Hide file tree
Showing 4 changed files with 10 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: f9fb860f67b9542cd78d1558dec7058092b57d8e
refs/heads/master: 61bce0f1371cfff497fe85594fd39d1a0b15ebe1
6 changes: 1 addition & 5 deletions trunk/include/linux/pid_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,7 @@ static inline void zap_pid_ns_processes(struct pid_namespace *ns)
}
#endif /* CONFIG_PID_NS */

static inline struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
{
return tsk->nsproxy->pid_ns;
}

extern struct pid_namespace *task_active_pid_ns(struct task_struct *tsk);
void pidhash_init(void);
void pidmap_init(void);

Expand Down
4 changes: 2 additions & 2 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1126,12 +1126,12 @@ static struct task_struct *copy_process(unsigned long clone_flags,

if (pid != &init_struct_pid) {
retval = -ENOMEM;
pid = alloc_pid(task_active_pid_ns(p));
pid = alloc_pid(p->nsproxy->pid_ns);
if (!pid)
goto bad_fork_cleanup_io;

if (clone_flags & CLONE_NEWPID) {
retval = pid_ns_prepare_proc(task_active_pid_ns(p));
retval = pid_ns_prepare_proc(p->nsproxy->pid_ns);
if (retval < 0)
goto bad_fork_free_pid;
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/kernel/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ pid_t task_session_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
}
EXPORT_SYMBOL(task_session_nr_ns);

struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
{
return ns_of_pid(task_pid(tsk));
}
EXPORT_SYMBOL_GPL(task_active_pid_ns);

/*
* Used by proc to find the first pid that is greater than or equal to nr.
*
Expand Down

0 comments on commit 575dd22

Please sign in to comment.