]> err.no Git - linux-2.6/commitdiff
futex: correctly return -EFAULT not -EINVAL
authorThomas Gleixner <tglx@linutronix.de>
Wed, 5 Dec 2007 14:46:09 +0000 (15:46 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 5 Dec 2007 14:46:09 +0000 (15:46 +0100)
return -EFAULT not -EINVAL. Found by review.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/futex.c

index e8fbdd7d95ac8ef74bf84a25a68e11ac286da60c..172a1aeeafdb5a148f6a0063bc3bc719b1974096 100644 (file)
@@ -658,7 +658,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this)
 
                if (curval == -EFAULT)
                        ret = -EFAULT;
-               if (curval != uval)
+               else if (curval != uval)
                        ret = -EINVAL;
                if (ret) {
                        spin_unlock(&pi_state->pi_mutex.wait_lock);