mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pid namespaces: helpers to find the task by its numerical ids
When searching the task by numerical id on may need to find it using global pid (as it is done now in kernel) or by its virtual id, e.g. when sending a signal to a task from one namespace the sender will specify the task's virtual id and we should find the task by this value. [[email protected]: fix gfs2 linkage] Signed-off-by: Pavel Emelyanov <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Sukadev Bhattiprolu <[email protected]> Cc: Paul Menage <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7af5729474
commit
198fe21b0a
4 changed files with 70 additions and 22 deletions
|
|
@ -2333,7 +2333,7 @@ static struct task_struct *next_tgid(unsigned int tgid)
|
|||
rcu_read_lock();
|
||||
retry:
|
||||
task = NULL;
|
||||
pid = find_ge_pid(tgid);
|
||||
pid = find_ge_pid(tgid, &init_pid_ns);
|
||||
if (pid) {
|
||||
tgid = pid->nr + 1;
|
||||
task = pid_task(pid, PIDTYPE_PID);
|
||||
|
|
|
|||
Loading…
Reference in a new issue