Re: [RFC PATCH 02/12] futex: Switch PI futex to use p->pi_futex_lock instead of p->pi_lock.
From: Peter Zijlstra
Date: Thu Sep 17 2026 - 13:19:50 EST
On Thu, Sep 17, 2026 at 04:33:26AM +0000, Suleiman Souhlal wrote:
> Switch PI futexes to use p->pi_futex_lock instead of p->pi_lock.
>
> When augmenting PING futexes with proxy execution, we get lock order
> inversions, due to the lock order being p->pi_lock -> mutex->wait_lock
> in the scheduler, but wait_lock -> p->pi_lock in futex code.
>
> So move the futex code to use a new lock, p->pi_futex_lock, to
> protect p->pi_state_list and pi_state->owner.
This is of course horrible. Lets not do this.