Преглед изворни кода

futex: correctly return -EFAULT not -EINVAL

return -EFAULT not -EINVAL. Found by review.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Thomas Gleixner пре 17 година
родитељ
комит
cde898fa80
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      kernel/futex.c

+ 1 - 1
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);