Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a06381fec77bf88ec6c5eb6324457cb04e9ffd69
Commit:     a06381fec77bf88ec6c5eb6324457cb04e9ffd69
Parent:     b2510b1696730307e7a388ea04132236ab45ac20
Author:     Thomas Gleixner <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 23 11:48:40 2007 +0200
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Jun 24 12:08:53 2007 -0700

    FUTEX: Restore the dropped ERSCH fix
    
    The return value of futex_find_get_task() needs to be -ESRCH in case
    that the search fails.  This was part of the original futex fixes and
    got accidentally dropped, when the futex-tidy-up patch was split out.
    
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Stable Team <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/futex.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/kernel/futex.c b/kernel/futex.c
index df248f5..45490be 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -409,14 +409,12 @@ static struct task_struct * futex_find_get_task(pid_t pid)
 
        rcu_read_lock();
        p = find_task_by_pid(pid);
-       if (!p)
-               goto out_unlock;
-       if ((current->euid != p->euid) && (current->euid != p->uid)) {
-               p = NULL;
-               goto out_unlock;
-       }
-       get_task_struct(p);
-out_unlock:
+
+       if (!p || ((current->euid != p->euid) && (current->euid != p->uid)))
+               p = ERR_PTR(-ESRCH);
+       else
+               get_task_struct(p);
+
        rcu_read_unlock();
 
        return p;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to