Re: [PATCH] futex: Drop CLONE_THREAD requirement for private default hash alloc

From: Davidlohr Bueso

Date: Fri May 01 2026 - 16:11:25 EST


On Fri, 01 May 2026, Linus Torvalds wrote:

On Fri, 1 May 2026 at 12:41, Davidlohr Bueso <dave@xxxxxxxxxxxx> wrote:

Loosen the check to cover any CLONE_VM clone, except vfork(). Excluding
vfork keeps the existing paths untouched (no overhead), and we can't
race in the first place: either the parent is suspended and the child runs
alone, or mm->futex_ref is already allocated from an earlier CLONE_THREAD.

That "earlier CLONE_THREAD" should presumably be "earlier CLONE_VM", no?

yes :)