From: Thomas Gleixner Date: Wed, 5 Dec 2007 14:46:09 +0000 (+0100) Subject: futex: correctly return -EFAULT not -EINVAL X-Git-Tag: v2.6.24-rc5~62^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cde898fa80a45bb23eab2a060fc79d0913081409;p=linux-2.6 futex: correctly return -EFAULT not -EINVAL return -EFAULT not -EINVAL. Found by review. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar --- diff --git a/kernel/futex.c b/kernel/futex.c index e8fbdd7d95..172a1aeeaf 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -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);