From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: sunliming <sunliming@kylinos.cn>,
Masami Hiramatsu <mhiramat@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Sasha Levin <sashal@kernel.org>,
linux-trace-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.1 03/12] tracing/user_events: Handle matching arguments that is null from dyn_events
Date: Thu, 29 Jun 2023 15:01:23 -0400 [thread overview]
Message-ID: <20230629190134.907949-3-sashal@kernel.org> (raw)
In-Reply-To: <20230629190134.907949-1-sashal@kernel.org>
From: sunliming <sunliming@kylinos.cn>
[ Upstream commit cfac4ed7279d056df6167bd665e460787dc9e0c4 ]
When A registering user event from dyn_events has no argments, it will pass the
matching check, regardless of whether there is a user event with the same name
and arguments. Add the matching check when the arguments of registering user
event is null.
Link: https://lore.kernel.org/linux-trace-kernel/20230529065110.303440-1-sunliming@kylinos.cn
Signed-off-by: sunliming <sunliming@kylinos.cn>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/trace/trace_events_user.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
index 774d146c2c2ca..ad64da21c34aa 100644
--- a/kernel/trace/trace_events_user.c
+++ b/kernel/trace/trace_events_user.c
@@ -1232,6 +1232,8 @@ static bool user_event_match(const char *system, const char *event,
if (match && argc > 0)
match = user_fields_match(user, argc, argv);
+ else if (match && argc == 0)
+ match = list_empty(&user->fields);
return match;
}
--
2.39.2
next prev parent reply other threads:[~2023-06-29 19:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-29 19:01 [PATCH AUTOSEL 6.1 01/12] arm64: dts: rockchip: fix USB regulator on ROCK64 Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 02/12] tracing/user_events: Prevent same name but different args event Sasha Levin
2023-06-29 19:01 ` Sasha Levin [this message]
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 04/12] tracing/user_events: Fix the incorrect trace record for empty arguments events Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 05/12] ieee802154/adf7242: Add MODULE_FIRMWARE macro Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 06/12] nfc: fdp: Add MODULE_FIRMWARE macros Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 07/12] ALSA: hda/realtek: Add quirk for ASUS ROG G634Z Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 08/12] net: dpaa2-mac: add 25gbase-r support Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 09/12] drm: use mgr->dev in drm_dbg_kms in drm_dp_add_payload_part2 Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 10/12] netfilter: nf_tables: disallow timeout for anonymous sets Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 11/12] ALSA: hda/realtek: Add quirk for ASUS ROG GV601V Sasha Levin
2023-06-29 19:01 ` [PATCH AUTOSEL 6.1 12/12] workqueue: clean up WORK_* constant types, clarify masking Sasha Levin
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=20230629190134.907949-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
--cc=sunliming@kylinos.cn \
/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