From: Pavel Emelyanov This call should return the virtual pid to the caller, just like the sys_getpid()/sys_gettid() do, no the global one. Signed-off-by: Pavel Emelyanov Signed-off-by: Alexey Dobriyan Cc: Sukadev Bhattiprolu Cc: Oleg Nesterov Signed-off-by: Andrew Morton --- kernel/fork.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/fork.c~pid-namespaces-changes-to-show-virtual-ids-to-user-fix-the-return-value-of-sys_set_tid_address kernel/fork.c --- a/kernel/fork.c~pid-namespaces-changes-to-show-virtual-ids-to-user-fix-the-return-value-of-sys_set_tid_address +++ a/kernel/fork.c @@ -948,7 +948,7 @@ asmlinkage long sys_set_tid_address(int { current->clear_child_tid = tidptr; - return current->pid; + return task_pid_vnr(current); } static inline void rt_mutex_init_task(struct task_struct *p) _