From: Namhyung Kim <namhyung@kernel.org>
To: Gu Bin <gubin@cmss.chinamobile.com>
Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com,
mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
jolsa@redhat.com, irogers@google.com, adrian.hunter@intel.com,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf trace: propagate evsel__set_filter() error in trace__expand_filter()
Date: Thu, 19 Nov 2026 00:09:42 -0800 [thread overview]
Message-ID: <av6uxj_pkVK27sCO@google.com> (raw)
In-Reply-To: <20261112080924.2082-1-gubin@cmss.chinamobile.com>
On Thu, Nov 12, 2026 at 04:09:21PM +0800, Gu Bin wrote:
> At the end of trace__expand_filter(), the return value of
> evsel__set_filter() is ignored. When the strdup() inside fails with
> -ENOMEM, the function returns 0 anyway, leaving evsel->filter holding
> the unexpanded filter, which still contains the symbolic constants the
> loop meant to resolve. The failure then surfaces later and indirectly:
> evlist__apply_filters() passes the unexpanded string to the tracepoint
> filter parser, which rejects the symbolic name, so perf trace fails to
> start with a filter syntax error whose real cause is the missed
> allocation.
>
> Propagate the error so the -ENOMEM is reported at the source and the
> caller fails immediately.
>
> Fixes: 90df0249c2ea ("perf trace: Expand strings in filters to integers")
> Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>
Oh, you already sent out the fix. :)
Thanks,
Namhyung
prev parent reply other threads:[~2026-11-19 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 8:09 [PATCH] perf trace: propagate evsel__set_filter() error in trace__expand_filter() Gu Bin
2026-11-12 8:15 ` sashiko-bot
2026-11-19 8:09 ` 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=av6uxj_pkVK27sCO@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=gubin@cmss.chinamobile.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.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