Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932351AbWBFUDZ (ORCPT ); Mon, 6 Feb 2006 15:03:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932353AbWBFUDZ (ORCPT ); Mon, 6 Feb 2006 15:03:25 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:28032 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S932351AbWBFUDX (ORCPT ); Mon, 6 Feb 2006 15:03:23 -0500 To: Cc: , Herbert Poetzl , "Serge E. Hallyn" , Alan Cox , Dave Hansen , Arjan van de Ven , Suleiman Souhlal , Hubertus Franke , Cedric Le Goater , Kyle Moffett , Kirill Korotaev , Greg , Linus Torvalds , Andrew Morton , Greg KH , Rik van Riel , Alexey Kuznetsov , Andrey Savochkin , Kirill Korotaev , Andi Kleen , Benjamin Herrenschmidt , Jeff Garzik , Trond Myklebust , Jes Sorensen Subject: [RFC][PATCH 15/20] posix-timers: Update posix timers to work with pspaces. References: From: ebiederm@xmission.com (Eric W. Biederman) Date: Mon, 06 Feb 2006 13:00:47 -0700 In-Reply-To: (Eric W. Biederman's message of "Mon, 06 Feb 2006 12:59:15 -0700") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2666 Lines: 89 Signed-off-by: Eric W. Biederman --- kernel/posix-cpu-timers.c | 9 +++++---- kernel/posix-timers.c | 4 +++- 2 files changed, 8 insertions(+), 5 deletions(-) 90b04f2eeb0fd42309ed68dad92e1b7bb4d2fba6 diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 520f6c5..9eda08a 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c @@ -3,6 +3,7 @@ */ #include +#include #include #include #include @@ -20,7 +21,7 @@ static int check_clock(const clockid_t w return 0; read_lock(&tasklist_lock); - p = find_task_by_pid(pid); + p = find_task_by_pid(current->pspace, pid); if (!p || (CPUCLOCK_PERTHREAD(which_clock) ? p->tgid != current->tgid : p->tgid != pid)) { error = -EINVAL; @@ -292,7 +293,7 @@ int posix_cpu_clock_get(const clockid_t */ struct task_struct *p; read_lock(&tasklist_lock); - p = find_task_by_pid(pid); + p = find_task_by_pid(current->pspace, pid); if (p) { if (CPUCLOCK_PERTHREAD(which_clock)) { if (p->tgid == current->tgid) { @@ -336,7 +337,7 @@ int posix_cpu_timer_create(struct k_itim if (pid == 0) { p = current; } else { - p = find_task_by_pid(pid); + p = find_task_by_pid(current->pspace, pid); if (p && p->tgid != current->tgid) p = NULL; } @@ -344,7 +345,7 @@ int posix_cpu_timer_create(struct k_itim if (pid == 0) { p = current->group_leader; } else { - p = find_task_by_pid(pid); + p = find_task_by_pid(current->pspace, pid); if (p && p->tgid != pid) p = NULL; } diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 216f574..5f6775c 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -365,7 +366,8 @@ static struct task_struct * good_sigeven 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_pid(current->pspace, + event->sigev_notify_thread_id)) || rtn->tgid != current->tgid || (event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_SIGNAL)) return NULL; -- 1.1.5.g3480 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/