Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'locking-urgent-2026-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fix from Ingo Molnar:
"Fix lockup in requeue-PI during signal/timeout wakeups, by Sebastian
Andrzej Siewior"

* tag 'locking-urgent-2026-05-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
futex: Prevent lockup in requeue-PI during signal/ timeout wakeup

+9 -4
+9 -4
kernel/futex/requeue.c
··· 319 319 return -EINVAL; 320 320 321 321 /* Ensure that this does not race against an early wakeup */ 322 - if (!futex_requeue_pi_prepare(top_waiter, NULL)) 322 + if (!futex_requeue_pi_prepare(top_waiter, NULL)) { 323 + plist_del(&top_waiter->list, &hb1->chain); 324 + futex_hb_waiters_dec(hb1); 323 325 return -EAGAIN; 326 + } 324 327 325 328 /* 326 329 * Try to take the lock for top_waiter and set the FUTEX_WAITERS bit ··· 725 722 726 723 /* 727 724 * We were woken prior to requeue by a timeout or a signal. 728 - * Unqueue the futex_q and determine which it was. 725 + * Conditionally unqueue the futex_q and determine which it was. 729 726 */ 730 - plist_del(&q->list, &hb->chain); 731 - futex_hb_waiters_dec(hb); 727 + if (!plist_node_empty(&q->list)) { 728 + plist_del(&q->list, &hb->chain); 729 + futex_hb_waiters_dec(hb); 730 + } 732 731 733 732 /* Handle spurious wakeups gracefully */ 734 733 ret = -EWOULDBLOCK;