Merge tag 'locking-urgent-2020-11-01' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / kernel / futex.c
index be68ac0..f8614ef 100644 (file)
@@ -1503,8 +1503,10 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_
         */
        newval = FUTEX_WAITERS | task_pid_vnr(new_owner);
 
-       if (unlikely(should_fail_futex(true)))
+       if (unlikely(should_fail_futex(true))) {
                ret = -EFAULT;
+               goto out_unlock;
+       }
 
        ret = cmpxchg_futex_value_locked(&curval, uaddr, uval, newval);
        if (!ret && (curval != uval)) {