linux/kernel/futex
Sebastian Andrzej Siewior 39def6d250 futex/requeue: Revert "Prevent NULL pointer dereference in remove_waiter() on self-deadlock""
The commit cited below should not have been merged. It attemted to fix an
existing problem ansd thereby introduced new problems by keeping the
pi_state in state Q_REQUEUE_PI_IN_PROGRESS and leaking it.

Based on the commit description the intention was to handle the case
when task_blocks_on_rt_mutex() returns -EDEADLK and the following
remove_waiter() dereferences the NULL pointer in waiter->task.

That is already handled by Davidlohr in commit 40a25d59e8
("locking/rtmutex: Skip remove_waiter() when waiter is not enqueued") and
requires no further acting.

Revert the commit breaking the "waiter == owner" case again.

Fixes: 74e144274a ("futex/requeue: Prevent NULL pointer dereference in remove_waiter() on self-deadlock")
Reported-by: Michael Bommarito <michael.bommarito@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260701131150.0Ijhq4Dw@linutronix.de
Closes: https://lore.kernel.org/all/20260629020049.2082397-1-michael.bommarito@gmail.com
2026-07-02 22:14:08 +02:00
..
core.c futex: Optimize futex hash bucket access patterns 2026-06-11 13:41:24 +02:00
futex.h futex: Optimize futex hash bucket access patterns 2026-06-11 13:41:24 +02:00
Makefile futex: Convert to compiler context analysis 2026-03-16 13:16:48 +01:00
pi.c futex: Optimize futex hash bucket access patterns 2026-06-11 13:41:24 +02:00
requeue.c futex/requeue: Revert "Prevent NULL pointer dereference in remove_waiter() on self-deadlock"" 2026-07-02 22:14:08 +02:00
syscalls.c futex: Add support for unlocking robust futexes 2026-06-03 11:38:51 +02:00
waitwake.c futex: Optimize futex hash bucket access patterns 2026-06-11 13:41:24 +02:00