Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71463
b: refs/heads/master
c: 8990571
h: refs/heads/master
i:
  71461: 2537887
  71459: 0061672
  71455: 33084fd
v: v3
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Oct 19, 2007
1 parent 69e6c3a commit 8a67157
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 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: bac0abd6174e427404dd197cdbefece31e97329b
refs/heads/master: 8990571eb573032c1192440febb17132074c5575
5 changes: 2 additions & 3 deletions trunk/include/linux/pid.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ extern struct pid_namespace init_pid_ns;
* see also find_task_by_pid() set in include/linux/sched.h
*/
extern struct pid *FASTCALL(find_pid_ns(int nr, struct pid_namespace *ns));

#define find_vpid(pid) find_pid_ns(pid, current->nsproxy->pid_ns)
#define find_pid(pid) find_pid_ns(pid, &init_pid_ns)
extern struct pid *find_vpid(int nr);
extern struct pid *find_pid(int nr);

/*
* Lookup a PID in the hash table, and return with it's count elevated.
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static inline int cap_set_pg(int pgrp_nr, kernel_cap_t *effective,
int found = 0;
struct pid *pgrp;

pgrp = find_pid_ns(pgrp_nr, current->nsproxy->pid_ns);
pgrp = find_vpid(pgrp_nr);
do_each_pid_task(pgrp, PIDTYPE_PGID, g) {
target = g;
while_each_thread(g, target) {
Expand Down
12 changes: 12 additions & 0 deletions trunk/kernel/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,18 @@ struct pid * fastcall find_pid_ns(int nr, struct pid_namespace *ns)
}
EXPORT_SYMBOL_GPL(find_pid_ns);

struct pid *find_vpid(int nr)
{
return find_pid_ns(nr, current->nsproxy->pid_ns);
}
EXPORT_SYMBOL_GPL(find_vpid);

struct pid *find_pid(int nr)
{
return find_pid_ns(nr, &init_pid_ns);
}
EXPORT_SYMBOL_GPL(find_pid);

/*
* attach_pid() must be called with the tasklist_lock write-held.
*/
Expand Down

0 comments on commit 8a67157

Please sign in to comment.