OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] Fix the return value of sys_set_tid_address()
[PATCH] Fix the return value of sys_set_tid_address() [message #15967] Fri, 17 August 2007 09:28
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
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 <xemul@openvz.org>
Signed-off-by: Alexey Dobriyan <adobriyan@openvz.org>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>

---

 kernel/fork.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 645c614..d7cff48 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -938,7 +938,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)
Previous Topic: [PATCH] Fix check for return value of create_pid_namespace
Next Topic: [PATCH] Use find_task_by_pid_ns() in places that operate with virtual pids
Goto Forum:
  


Current Time: Tue Aug 19 12:18:51 GMT 2025

Total time taken to generate the page: 0.14172 seconds