Linux Perf Users
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: michael.niarchos@gmail.com
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	James Clark <james.clark@linaro.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 0/3] perf tools: Fix memory issues
Date: Wed, 5 Aug 2026 22:12:33 -0700	[thread overview]
Message-ID: <anQXwT3fD5oZDWz0@google.com> (raw)
In-Reply-To: <20260803-perf-kvm-fixes-v3-0-e06268ec06fa@gmail.com>

Hello,

On Mon, Aug 03, 2026 at 03:51:51PM +0200, Michalis Niarchos via B4 Relay wrote:
> Running:
>   $ perf kvm stat record -a sleep 10
> 
> gives this output:
>   [ perf record: Woken up 1 times to write data ]
>   [ perf record: Captured and wrote 1.361 MB perf.data.guest ]
>   double free or corruption (!prev)
> 
> In the process of resolving this, I came across some memory leaks.

I think those issues are already fixed in the perf-tools-next.
Can you please check the latest code?

Thanks,
Namhyung

> 
> Signed-off-by: Michalis Niarchos <michael.niarchos@gmail.com>
> ---
> Changes in v3:
> - Moved dead code removal to the correct patch.
> - Squashed double free patches, as both fix the same rec_argv
>   double-free/leak pattern.
> - Link to v2: https://patch.msgid.link/20260803-perf-kvm-fixes-v2-0-1b337189fffc@gmail.com
> 
> Changes in v2:
> - Removed code block that was rendered dead by the
>   get_filename_for_perf_kvm() change.
> - Dropped invalid free() fix from kvm_events_report().
> - Added double free fixes for: __cmd_record(), __cmd_report(),
>   __cmd_buildid_list(), and __cmd_top(), which follow the same pattern
>   as kvm_events_record().
> - Link to v1: https://patch.msgid.link/20260803-perf-kvm-fixes-v1-0-a5db849ac973@gmail.com
> 
> To: Peter Zijlstra <peterz@infradead.org>
> To: Ingo Molnar <mingo@redhat.com>
> To: Arnaldo Carvalho de Melo <acme@kernel.org>
> To: Namhyung Kim <namhyung@kernel.org>
> To: Mark Rutland <mark.rutland@arm.com>
> To: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> To: Jiri Olsa <jolsa@kernel.org>
> To: Ian Rogers <irogers@google.com>
> To: Adrian Hunter <adrian.hunter@intel.com>
> To: James Clark <james.clark@linaro.org>
> Cc: linux-perf-users@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> 
> ---
> Michalis Niarchos (3):
>       perf tools: Fix memory leak in cmd_kvm()
>       perf tools: Fix double free and memory leak issues
>       perf tools: Fix memory leak in cmd_kvm()
> 
>  tools/perf/builtin-kvm.c                         | 99 +++++++++++-------------
>  tools/perf/util/kvm-stat-arch/kvm-stat-powerpc.c |  4 +-
>  tools/perf/util/kvm-stat-arch/kvm-stat-x86.c     | 10 +--
>  3 files changed, 50 insertions(+), 63 deletions(-)
> ---
> base-commit: a1ed064cb4db70af8c4177b3805ca5b8b0be567e
> change-id: 20260731-perf-kvm-fixes-a17f0aa048ad
> 
> Best regards,
> --  
> Michalis Niarchos <michael.niarchos@gmail.com>
> 
> 

  parent reply	other threads:[~2026-08-06  5:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 13:51 [PATCH v3 0/3] perf tools: Fix memory issues Michalis Niarchos via B4 Relay
2026-08-03 13:51 ` [PATCH v3 1/3] perf tools: Fix memory leak in cmd_kvm() Michalis Niarchos via B4 Relay
2026-08-03 13:51 ` [PATCH v3 2/3] perf tools: Fix double free and memory leak issues Michalis Niarchos via B4 Relay
2026-08-03 13:51 ` [PATCH v3 3/3] perf tools: Fix memory leak in cmd_kvm() Michalis Niarchos via B4 Relay
2026-08-06  5:12 ` Namhyung Kim [this message]
2026-08-06 12:17   ` [PATCH v3 0/3] perf tools: Fix memory issues Michalis Niarchos

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=anQXwT3fD5oZDWz0@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=james.clark@linaro.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=michael.niarchos@gmail.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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