]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/futex.c
r8169: perform RX config change after mac filtering
[linux-2.6-omap-h63xx.git] / kernel / futex.c
index df248f5e0836c708ce1eca1bdb1090524370b3d1..45490bec5831d5a806c1703251f82dec3e599d63 100644 (file)
@@ -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;