Re: [RFC][PATCH 4/4] futex: Rewrite FUTEX_UNLOCK_PI
From: Thomas Gleixner
Date: Sat Oct 08 2016 - 14:30:32 EST
On Fri, 7 Oct 2016, Peter Zijlstra wrote:
> + /*
> + * Grab a reference on the pi_state and drop hb->lock.
> + *
> + * The reference ensures pi_state lives, dropping the hb->lock
> + * is tricky.. wake_futex_pi() will take rt_mutex::wait_lock to
> + * close the races against futex_lock_pi(), but in case of
> + * _any_ fail we'll abort and retry the whole deal.
> + */
> + WARN_ON_ONCE(!atomic_inc_not_zero(&pi_state->refcount));
> + spin_unlock(&hb->lock);
> + ret = wake_futex_pi(uaddr, uval, pi_state);
> + put_pi_state(pi_state);
> * In case of success wake_futex_pi dropped the hash
> * bucket lock.
This comment has become stale.