linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Christoph Lameter (Ampere)" <cl@gentwo.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-mm@kvack.org,  Dennis Zhou <dennis@kernel.org>,
	Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] mm/percpu: Add a simple double-free check for per-CPU memory
Date: Fri, 5 Sep 2025 10:14:55 -0700 (PDT)	[thread overview]
Message-ID: <7d57bb57-9939-df2e-243a-a0290f79c6f6@gentwo.org> (raw)
In-Reply-To: <20250904155146.485ab7def1b89ed7317b76ad@linux-foundation.org>

On Thu, 4 Sep 2025, Andrew Morton wrote:

> On Thu, 4 Sep 2025 16:35:14 +0200 Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
>
> > The free path clears the allocation bits in pcpu_chunk::alloc_map. A
> > simple double free check would be to check if the bits, which are about
> > to be cleared, are already cleared.
> >
>
> Nice idea.  It's hardly a fast path!

And it could be improved by checking the bit instead of finding the next
one.



  reply	other threads:[~2025-09-05 17:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04 14:35 Sebastian Andrzej Siewior
2025-09-04 22:51 ` Andrew Morton
2025-09-05 17:14   ` Christoph Lameter (Ampere) [this message]
2025-09-04 23:49 ` Dennis Zhou

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=7d57bb57-9939-df2e-243a-a0290f79c6f6@gentwo.org \
    --to=cl@gentwo.org \
    --cc=akpm@linux-foundation.org \
    --cc=bigeasy@linutronix.de \
    --cc=dennis@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tj@kernel.org \
    /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