Skip to content

Commit

Permalink
futex: correctly return -EFAULT not -EINVAL
Browse files Browse the repository at this point in the history
return -EFAULT not -EINVAL. Found by review.

Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
KAGA-KOKO authored and Ingo Molnar committed Dec 5, 2007
1 parent 5456178 commit cde898f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/futex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cde898f

Please sign in to comment.