mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
	"Andr� Almeida" <andrealmeid@igalia.com>,
	"Calvin Owens" <calvin@wbinvd.org>,
	"Darren Hart" <dvhart@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Thomas Gleixner" <tglx@linutronix.de>
Subject: Re: [PATCH] futex: Initialize futex_phash_new during fork().
Date: Mon, 23 Jun 2025 09:37:43 -0700	[thread overview]
Message-ID: <20250623163743.ocimtxqdrwnkffjv@offworld> (raw)
In-Reply-To: <20250623083408.jTiJiC6_@linutronix.de>

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@wbinvd.org>
>Closes: https://lore.kernel.org/all/aFBQ8CBKmRzEqIfS@mozart.vkv.me/
>Tested-by: Calvin Owens <calvin@wbinvd.org>
>Fixes: bd54df5ea7cad ("futex: Allow to resize the private local hash")
>Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>

      parent reply	other threads:[~2025-06-23 16:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23  8:34 Sebastian Andrzej Siewior
2025-06-23 13:04 ` [tip: locking/urgent] " tip-bot2 for Sebastian Andrzej Siewior
2025-06-23 16:27 ` [PATCH] " André Almeida
2025-06-23 16:37 ` Davidlohr Bueso [this message]

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=20250623163743.ocimtxqdrwnkffjv@offworld \
    --to=dave@stgolabs.net \
    --cc=andrealmeid@igalia.com \
    --cc=bigeasy@linutronix.de \
    --cc=calvin@wbinvd.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®