aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/timer.c')
-rw-r--r--kernel/timer.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 8521d10fbb27..fb4e67d5dd60 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -26,6 +26,7 @@
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/mm.h> 27#include <linux/mm.h>
28#include <linux/swap.h> 28#include <linux/swap.h>
29#include <linux/pid_namespace.h>
29#include <linux/notifier.h> 30#include <linux/notifier.h>
30#include <linux/thread_info.h> 31#include <linux/thread_info.h>
31#include <linux/time.h> 32#include <linux/time.h>
@@ -956,7 +957,7 @@ asmlinkage unsigned long sys_alarm(unsigned int seconds)
956 */ 957 */
957asmlinkage long sys_getpid(void) 958asmlinkage long sys_getpid(void)
958{ 959{
959 return current->tgid; 960 return task_tgid_vnr(current);
960} 961}
961 962
962/* 963/*
@@ -970,7 +971,7 @@ asmlinkage long sys_getppid(void)
970 int pid; 971 int pid;
971 972
972 rcu_read_lock(); 973 rcu_read_lock();
973 pid = rcu_dereference(current->real_parent)->tgid; 974 pid = task_ppid_nr_ns(current, current->nsproxy->pid_ns);
974 rcu_read_unlock(); 975 rcu_read_unlock();
975 976
976 return pid; 977 return pid;
@@ -1102,7 +1103,7 @@ EXPORT_SYMBOL(schedule_timeout_uninterruptible);
1102/* Thread ID - the internal kernel "pid" */ 1103/* Thread ID - the internal kernel "pid" */
1103asmlinkage long sys_gettid(void) 1104asmlinkage long sys_gettid(void)
1104{ 1105{
1105 return current->pid; 1106 return task_pid_vnr(current);
1106} 1107}
1107 1108
1108/** 1109/**