LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: acme@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com,
	 vmolnaro@redhat.com, mpetlan@redhat.com, tmricht@linux.ibm.com,
	 maddy@linux.ibm.com, irogers@google.com,
	 Tanushree Shah <tshah@linux.ibm.com>
Cc: linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	 atrajeev@linux.ibm.com, hbathini@linux.ibm.com,
	Tejas.Manhas1@ibm.com,  Tanushree.Shah@ibm.com,
	Shivani.Nittor@ibm.com
Subject: Re: [PATCH] perf data convert json: Fix trace_seq memory leak in process_sample_event()
Date: Wed, 08 Jul 2026 12:25:42 -0700	[thread overview]
Message-ID: <178353874278.478719.17250628813855454145.b4-ty@kernel.org> (raw)
In-Reply-To: <20260604065519.112101-1-tshah@linux.ibm.com>

On Thu, 04 Jun 2026 12:25:19 +0530, Tanushree Shah wrote:
> Unlike the in-kernel trace_seq which uses a statically allocated buffer,
> the userspace traceevent library's trace_seq uses a dynamically allocated
> one. Therefore, every trace_seq_init() call must be paired with a
> trace_seq_destroy(), otherwise it produces a memory leak.
> 
> In process_sample_event(), a trace_seq is initialized for each field when
> formatting tracepoint raw_data, but the matching trace_seq_destroy() is
> never called, leaking memory for every field of every sample processed.
> 
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung




      parent reply	other threads:[~2026-07-08 19:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  6:55 [PATCH] perf data convert json: Fix trace_seq memory leak in process_sample_event() Tanushree Shah
2026-06-04 21:29 ` Arnaldo Carvalho de Melo
2026-06-11 11:53   ` Tanushree Shah
2026-07-01 21:20     ` Namhyung Kim
2026-07-02  7:16       ` Tanushree Shah
2026-07-03 23:59         ` Namhyung Kim
2026-07-07 14:06           ` Tanushree Shah
2026-07-08  6:05             ` Namhyung Kim
2026-07-08 19:25 ` Namhyung Kim [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=178353874278.478719.17250628813855454145.b4-ty@kernel.org \
    --to=namhyung@kernel.org \
    --cc=Shivani.Nittor@ibm.com \
    --cc=Tanushree.Shah@ibm.com \
    --cc=Tejas.Manhas1@ibm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=atrajeev@linux.ibm.com \
    --cc=hbathini@linux.ibm.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mpetlan@redhat.com \
    --cc=tmricht@linux.ibm.com \
    --cc=tshah@linux.ibm.com \
    --cc=vmolnaro@redhat.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