소스 검색

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)
 		if (curval == -EFAULT)
 			ret = -EFAULT;
 			ret = -EFAULT;
-		if (curval != uval)
+		else if (curval != uval)
 			ret = -EINVAL;
 			ret = -EINVAL;
 		if (ret) {
 		if (ret) {
 			spin_unlock(&pi_state->pi_mutex.wait_lock);
 			spin_unlock(&pi_state->pi_mutex.wait_lock);