From: Mike Rapoport <rppt@kernel.org>
To: Hubert Mazur <hmazur@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stanislaw Kardach <skardach@google.com>,
Michal Krawczyk <mikrawczyk@google.com>,
Slawomir Rosek <srosek@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] mm/execmem: Make the populate and alloc atomic
Date: Sun, 22 Mar 2026 13:01:35 +0200 [thread overview]
Message-ID: <ab_MD2rJYCG2EGZh@kernel.org> (raw)
In-Reply-To: <20260320075723.779985-1-hmazur@google.com>
On Fri, Mar 20, 2026 at 07:57:23AM +0000, Hubert Mazur wrote:
> When a block of memory is requested from the execmem manager it tries
> to find a suitable fragment by traversing the free_areas. In case
> there is no such block, a new memory area is added to the free_areas
> and then allocated to the caller by traversing the free_area tree again.
>
> The above operations of allocation and tree traversal are not atomic
> hence another request may consume this newly allocated memory block
> which results in the allocation failure for the original request.
> Such occurrence can be spotted on devices running the 6.18 kernel
> during the parallel modules loading.
>
> To mitigate such resource races execute the cache population and
> allocation operations under one mutex lock.
>
> Signed-off-by: Hubert Mazur <hmazur@google.com>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
--
Sincerely yours,
Mike.
prev parent reply other threads:[~2026-03-22 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 7:57 [PATCH v4] mm/execmem: Make the populate and alloc atomic Hubert Mazur
2026-03-22 11:01 ` Mike Rapoport [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=ab_MD2rJYCG2EGZh@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=hmazur@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mikrawczyk@google.com \
--cc=skardach@google.com \
--cc=srosek@google.com \
/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