Commit 1c840c14 authored by Thomas Gleixner's avatar Thomas Gleixner

futex: fix restart for early wakeup in futex_wait_requeue_pi()

The futex_wait_requeue_pi op should restart unconditionally like
futex_lock_pi. The user of that function e.g. pthread_cond_wait can
not be interrupted so we do not care about the SA_RESTART flag of the
signal. Clean up the FIXMEs.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent c8b15a70
...@@ -2060,7 +2060,7 @@ static int futex_unlock_pi(u32 __user *uaddr, int fshared) ...@@ -2060,7 +2060,7 @@ static int futex_unlock_pi(u32 __user *uaddr, int fshared)
* *
* Returns * Returns
* 0 - no early wakeup detected * 0 - no early wakeup detected
* <0 - -ETIMEDOUT or -ERESTARTSYS (FIXME: or ERESTARTNOINTR?) * <0 - -ETIMEDOUT or -ERESTARTNOINTR
*/ */
static inline static inline
int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
...@@ -2087,15 +2087,8 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb, ...@@ -2087,15 +2087,8 @@ int handle_early_requeue_pi_wakeup(struct futex_hash_bucket *hb,
if (timeout && !timeout->task) if (timeout && !timeout->task)
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
else { else
/* ret = -ERESTARTNOINTR;
* We expect signal_pending(current), but another
* thread may have handled it for us already.
*/
/* FIXME: ERESTARTSYS or ERESTARTNOINTR? Do we care if
* the user specified SA_RESTART or not? */
ret = -ERESTARTSYS;
}
} }
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment