mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tristan Madani <tristmd@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Ingo Molnar <mingo@kernel.org>,
	Dave Hansen <dave@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Tristan Madani <tristan@talencesecurity.com>
Subject: Re: [PATCH v2] profiling: don't free prof_cpu_mask on init failure
Date: Fri, 26 Jun 2026 15:36:31 -0000	[thread overview]
Message-ID: <178248819183.3242446.8706480116416421586@gmail.com> (raw)
In-Reply-To: <20260624181113.8b2aacf9b1466205c8f2cf05@linux-foundation.org>

On Wed, 24 Jun 2026 18:11:13 -0700 Andrew Morton wrote:
> Confused.  Current mainline has no free_cpumask_var() here?

Correct -- Tetsuo's 7c51f7bbf057 ("profiling: remove prof_cpu_mask")
removed the variable and all its references in v6.11. This patch is
for 6.1.y and 6.6.y where the old error-path free is still present.

> If we're to deliberately leak the mask here then let's have a little
> comment explaining the reasoning, so we don't later receive "profiling:
> fix memory leak" patches.

Good point. I can send v3 with:
  - a comment above the return explaining the deliberate leak
  - corrected Fixes tag (c309b917cab5, per Tetsuo's review)
  - stable-only framing in the commit message

Alternatively, Cc stable on 7c51f7bbf057 would also fix this, though
that commit removes prof_cpu_mask entirely, adds mutex serialization
in ksysfs.c, and drops the hotplug online callback (2 files, +13/-40).

Happy to go either way.

Tristan

      reply	other threads:[~2026-06-26 15:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-21 19:23 [PATCH] profiling: prevent stale prof_cpu_mask access " Tristan Madani
2026-06-21 22:49 ` Tetsuo Handa
2026-06-21 23:45   ` Tristan Madani
2026-06-22  0:00 ` [PATCH v2] profiling: don't free prof_cpu_mask " Tristan Madani
2026-06-22 11:32   ` Tetsuo Handa
2026-06-22 18:28     ` Tristan Madani
2026-06-22 22:50       ` Tetsuo Handa
2026-06-25  1:11   ` Andrew Morton
2026-06-26 15:36     ` Tristan Madani [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=178248819183.3242446.8706480116416421586@gmail.com \
    --to=tristmd@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=stable@vger.kernel.org \
    --cc=tristan@talencesecurity.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

all inboxes | Powered by JetHome®