All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ian Rogers" <irogers@google.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH v1] perf test code-reading: Fix duplicate kernel maps and machine leak
Date: Mon, 28 Sep 2026 08:06:22 +0000	[thread overview]
Message-ID: <20260928080623.0901C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928075517.3057621-1-irogers@google.com>

> In do_test_code_reading(), machine__new_host(&host_env) already calls
> machine__create_kernel_maps(machine). Calling
> machine__create_kernel_maps(machine) a second time immediately
> afterwards duplicates all kernel module maps in machine->kmaps, causing
> dso__load_kcore()'s module validation (do_validate_kcore_modules()) to
> fail and fall back to /proc/kallsyms.
> 
> Furthermore, when try_kcore is true and !have_kcore, returning
> TEST_CODE_READING_NO_KCORE directly bypasses out_err, leaking the entire
> struct machine, its kernel/module maps and DSOs, all kallsyms symbols,
> and host_env.
> 
> Remove the redundant machine__create_kernel_maps() call, check for
> !machine after machine__new_host(), and jump to out_err when returning
> TEST_CODE_READING_NO_KCORE.
> 
> Fixes: 0fd4008ed755 ("perf test: Use machine__new_host in mmap thread code reading test")
> Assisted-by: Antigravity:gemini-3.1-pro
> Signed-off-by: Ian Rogers <irogers@google.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260928075517.3057621-1-irogers@google.com?part=1


  reply	other threads:[~2026-09-28  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  7:55 [PATCH v1] perf test code-reading: Fix duplicate kernel maps and machine leak Ian Rogers
2026-09-28  8:06 ` sashiko-bot [this message]
2026-09-28 16:39 ` Arnaldo Carvalho de Melo

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=20260928080623.0901C1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=irogers@google.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.