Deprecate find_task_by_pid()
There are some places that are known to operate on tasks' global pids only: * the rest_init() call (called on boot) * the kgdb's getthread * the create_kthread() (since the kthread is run in init ns) So use the find_task_by_pid_ns(..., &init_pid_ns) there and schedule the find_task_by_pid for removal. [sukadev@us.ibm.com: Fix warning in kernel/pid.c] Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
cb41d6d068
commit
5cd204550b
@@ -1677,7 +1677,10 @@ extern struct pid_namespace init_pid_ns;
|
||||
extern struct task_struct *find_task_by_pid_type_ns(int type, int pid,
|
||||
struct pid_namespace *ns);
|
||||
|
||||
extern struct task_struct *find_task_by_pid(pid_t nr);
|
||||
static inline struct task_struct *__deprecated find_task_by_pid(pid_t nr)
|
||||
{
|
||||
return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
|
||||
}
|
||||
extern struct task_struct *find_task_by_vpid(pid_t nr);
|
||||
extern struct task_struct *find_task_by_pid_ns(pid_t nr,
|
||||
struct pid_namespace *ns);
|
||||
|
||||
Reference in New Issue
Block a user