aboutsummaryrefslogtreecommitdiff
path: root/kernel/posix-timers.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-02-08 04:21:52 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:41 -0800
commit8dc86af00612e5ccff3384c17575362a3f2a2ca0 (patch)
tree04ed08d10cc99d4a283c8ccac078c4ac544b7b94 /kernel/posix-timers.c
parent20a8143eaa3300a58326156eaf43e03db0fd2cb6 (diff)
Use find_task_by_vpid in posix timers
All the functions that need to lookup a task by pid in posix timers obtain this pid from a user space, and thus this value refers to a task in the same namespace, as the current task lives in. So the proper behavior is to call find_task_by_vpid() here. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/posix-timers.c')
-rw-r--r--kernel/posix-timers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index 122d5c787fe..ce268966007 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -404,7 +404,7 @@ static struct task_struct * good_sigevent(sigevent_t * event)
struct task_struct *rtn = current->group_leader;
if ((event->sigev_notify & SIGEV_THREAD_ID ) &&
- (!(rtn = find_task_by_pid(event->sigev_notify_thread_id)) ||
+ (!(rtn = find_task_by_vpid(event->sigev_notify_thread_id)) ||
!same_thread_group(rtn, current) ||
(event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_SIGNAL))
return NULL;