diff options
author | Roland McGrath | 2008-01-10 21:52:04 +0100 |
---|---|---|
committer | Linus Torvalds | 2008-01-13 18:56:43 +0100 |
commit | 84427eaef1fb91704c7112bdb598c810003b99f3 (patch) | |
tree | bf22a7186295fcb6dc6bced34cfa73aa74b27300 /kernel/timer.c | |
parent | Use access mode instead of open flags to determine needed permissions (diff) | |
download | kernel-qcow2-linux-84427eaef1fb91704c7112bdb598c810003b99f3.tar.gz kernel-qcow2-linux-84427eaef1fb91704c7112bdb598c810003b99f3.tar.xz kernel-qcow2-linux-84427eaef1fb91704c7112bdb598c810003b99f3.zip |
remove task_ppid_nr_ns
task_ppid_nr_ns is called in three places. One of these should never
have called it. In the other two, using it broke the existing
semantics. This was presumably accidental. If the function had not
been there, it would have been much more obvious to the eye that those
patches were changing the behavior. We don't need this function.
In task_state, the pid of the ptracer is not the ppid of the ptracer.
In do_task_stat, ppid is the tgid of the real_parent, not its pid.
I also moved the call outside of lock_task_sighand, since it doesn't
need it.
In sys_getppid, ppid is the tgid of the real_parent, not its pid.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/timer.c')
-rw-r--r-- | kernel/timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/timer.c b/kernel/timer.c index d4527dcef1af..26671f4db07f 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -978,7 +978,7 @@ asmlinkage long sys_getppid(void) int pid; rcu_read_lock(); - pid = task_ppid_nr_ns(current, current->nsproxy->pid_ns); + pid = task_tgid_nr_ns(current->real_parent, current->nsproxy->pid_ns); rcu_read_unlock(); return pid; |