From: sashiko-bot@kernel.org
To: "Gu Bin" <gubin@cmss.chinamobile.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf trace: propagate evsel__set_filter() error in trace__expand_filter()
Date: Thu, 12 Nov 2026 08:15:18 +0000 [thread overview]
Message-ID: <sashiko-outbox-210681@kernel.org> (raw)
In-Reply-To: <20261112080924.2082-1-gubin@cmss.chinamobile.com>
> 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>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112080924.2082-1-gubin@cmss.chinamobile.com?part=1
prev parent reply other threads:[~2026-11-12 8:15 UTC|newest]
Thread overview: 2+ 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 [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=sashiko-outbox-210681@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=gubin@cmss.chinamobile.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox