From nobody Sun Feb 8 11:45:45 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 151FAEB64D9 for ; Thu, 15 Jun 2023 13:35:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344003AbjFONfg (ORCPT ); Thu, 15 Jun 2023 09:35:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344484AbjFONfD (ORCPT ); Thu, 15 Jun 2023 09:35:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5046430E0 for ; Thu, 15 Jun 2023 06:34:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 15584637DA for ; Thu, 15 Jun 2023 13:34:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7872DC43391; Thu, 15 Jun 2023 13:34:16 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.96) (envelope-from ) id 1q9n79-000TmP-1U; Thu, 15 Jun 2023 09:34:15 -0400 Message-ID: <20230615133415.275901907@goodmis.org> User-Agent: quilt/0.66 Date: Thu, 15 Jun 2023 09:05:34 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton , sunliming Subject: [for-linus][PATCH 03/15] tracing/user_events: Handle matching arguments that is null from dyn_events References: <20230615130531.200384328@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: sunliming 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 n= ame 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-su= nliming@kylinos.cn Signed-off-by: sunliming Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- 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_u= ser.c index 37a38496a6be..afe61dc86543 100644 --- a/kernel/trace/trace_events_user.c +++ b/kernel/trace/trace_events_user.c @@ -1745,6 +1745,8 @@ static bool user_event_match(const char *system, cons= t char *event, =20 if (match && argc > 0) match =3D user_fields_match(user, argc, argv); + else if (match && argc =3D=3D 0) + match =3D list_empty(&user->fields); =20 return match; } --=20 2.39.2