[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250623163743.ocimtxqdrwnkffjv@offworld>
Date: Mon, 23 Jun 2025 09:37:43 -0700
From: Davidlohr Bueso <dave@...olabs.net>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org,
Andr� Almeida <andrealmeid@...lia.com>,
Calvin Owens <calvin@...nvd.org>,
Darren Hart <dvhart@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] futex: Initialize futex_phash_new during fork().
On Mon, 23 Jun 2025, Sebastian Andrzej Siewior wrote:
>During a hash resize operation the new private hash is stored in
>mm_struct::futex_phash_new if the current hash can not be immediately
>replaced.
>
>The new hash must not be copied during fork() into the new task. Doing
>so will lead to a double-free of the memory by the two tasks.
>
>Initialize the mm_struct::futex_phash_new during fork().
>
>Reported-by: Calvin Owens <calvin@...nvd.org>
>Closes: https://lore.kernel.org/all/aFBQ8CBKmRzEqIfS@mozart.vkv.me/
>Tested-by: Calvin Owens <calvin@...nvd.org>
>Fixes: bd54df5ea7cad ("futex: Allow to resize the private local hash")
>Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Reviewed-by: Davidlohr Bueso <dave@...olabs.net>
Powered by blists - more mailing lists