From: Thomas Gleixner <tglx@kernel.org>
To: Keno Fischer <keno@juliahub.com>
Cc: "Ingo Molnar" <mingo@redhat.com>,
"Peter Zijlstra" <peterz@infradead.org>,
"Darren Hart" <dvhart@infradead.org>,
"Davidlohr Bueso" <dave@stgolabs.net>,
"André Almeida" <andrealmeid@igalia.com>,
"Yang Tao" <yang.tao172@zte.com.cn>,
"Yi Wang" <wang.yi59@zte.com.cn>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org, "Florian Weimer" <fweimer@redhat.com>,
"Oleg Nesterov" <oleg@redhat.com>,
"Christian Brauner" <brauner@kernel.org>
Subject: Re: [PATCH] futex: Make FUTEX_WAITERS state consistent for robust futex unlock
Date: Fri, 31 Jul 2026 18:05:42 +0200 [thread overview]
Message-ID: <877bmbf8kp.ffs@fw13> (raw)
In-Reply-To: <87a4r7fnl8.ffs@fw13>
On Fri, Jul 31 2026 at 12:41, Thomas Gleixner wrote:
> On Fri, Jul 31 2026 at 00:36, Keno Fischer wrote:
>>> + /*
>>> + * This should never happen because evaluate_waiters() would
>>> + * have detected a PI futex mixup already.
>>> + */
>>> + if (WARN_ON_ONCE(nr_woken < 0))
>>> + return nr_woken;
>>
>> I missed this before, but the same issue makes this WARN reachable. If there's
>> a bunch of bitset-mismatched waiters at the start of the queue, then the check
>> will early out and the PI mixup will not be discovered until the second walk.
>
> Yes, but that has been the case forever and it's done opportunisticly to
> avoid full hash bucket walks wherever possible.
Duh. I misread what you said, but yes with the changes I did now it
should all be fine.
I'll post the lot later.
next prev parent reply other threads:[~2026-07-31 16:05 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 3:26 [PATCH] futex: Prevent robust futex exit race more Keno Fischer
2026-07-21 12:24 ` Thomas Gleixner
2026-07-21 16:50 ` Keno Fischer
2026-07-22 14:21 ` Thomas Gleixner
2026-07-23 12:53 ` Christian Brauner
2026-07-23 13:24 ` Florian Weimer
2026-07-24 8:20 ` Christian Brauner
2026-07-23 19:59 ` Keno Fischer
2026-07-23 19:44 ` Keno Fischer
2026-07-26 20:39 ` Thomas Gleixner
2026-07-26 22:54 ` Keno Fischer
2026-07-27 13:12 ` Thomas Gleixner
2026-07-27 17:23 ` Keno Fischer
2026-07-28 19:43 ` Thomas Gleixner
2026-07-28 21:29 ` Thomas Gleixner
2026-07-30 21:06 ` Thomas Gleixner
2026-07-30 22:15 ` [PATCH] futex: Make FUTEX_WAITERS state consistent for robust futex unlock Thomas Gleixner
2026-07-31 4:36 ` Keno Fischer
2026-07-31 10:41 ` Thomas Gleixner
2026-07-31 16:05 ` Thomas Gleixner [this message]
2026-07-28 22:05 ` [PATCH] futex: Prevent robust futex exit race more Thomas Gleixner
2026-07-28 22:13 ` Keno Fischer
2026-07-29 13:47 ` Thomas Gleixner
2026-07-29 14:47 ` Keno Fischer
2026-07-30 6:58 ` Thomas Gleixner
2026-07-30 19:46 ` Keno Fischer
2026-07-30 20:39 ` [tip: locking/futex] " tip-bot2 for Keno Fischer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877bmbf8kp.ffs@fw13 \
--to=tglx@kernel.org \
--cc=andrealmeid@igalia.com \
--cc=brauner@kernel.org \
--cc=dave@stgolabs.net \
--cc=dvhart@infradead.org \
--cc=fweimer@redhat.com \
--cc=keno@juliahub.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=wang.yi59@zte.com.cn \
--cc=yang.tao172@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox