Re: [PATCH] futex/requeue: Revert "Prevent NULL pointer dereference in remove_waiter() on self-deadlock""
From: Thomas Gleixner
Date: Wed Jul 01 2026 - 15:13:32 EST
On Wed, Jul 01 2026 at 17:45, Sebastian Andrzej Siewior wrote:
> On 2026-07-01 17:25:05 [+0200], Thomas Gleixner wrote:
>> > That has been already handled by Davidlohr in commit 40a25d59e85b3
>> > ("locking/rtmutex: Skip remove_waiter() when waiter is not enqueued")
>> > and requires no further acting.
>>
>> No. If the self deadlock is obvious, then this should not even go into
>> the proxy lock code. I clearly failed to notice the leak problem, but
>> reverting it and relying on some magic down the road to handle it
>> correctly is not really solid.
>
> Davidlohr fixed the issue that has been fixed again. We don't need two
> changes for the same thing.
He hardened the remove() function against that scenario.
> We have deadlock detection down the road, why special case it here?
It's not special, but there is no point to actucally call into complex
and as demonstrated fragile code when you can avoid it upfront, no?