diff --git a/kernel/futex.c b/kernel/futex.c index 20c468356b9029d686d658a6dee546373b73a00b..dcec01856cf3c531dca9eae4aa26ad32aaeaafd0 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -1735,9 +1735,9 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, case 0: /* We hold a reference on the pi state. */ break; + + /* If the above failed, then pi_state is NULL */ case -EFAULT: - put_pi_state(pi_state); - pi_state = NULL; double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); put_futex_key(&key2); @@ -1753,8 +1753,6 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, * exit to complete. * - The user space value changed. */ - put_pi_state(pi_state); - pi_state = NULL; double_unlock_hb(hb1, hb2); hb_waiters_dec(hb2); put_futex_key(&key2);