From nobody Mon Apr 6 10:30:26 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 0792FC32771 for ; Sun, 18 Sep 2022 12:29:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229596AbiIRM3g (ORCPT ); Sun, 18 Sep 2022 08:29:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229507AbiIRM3d (ORCPT ); Sun, 18 Sep 2022 08:29:33 -0400 Received: from out199-17.us.a.mail.aliyun.com (out199-17.us.a.mail.aliyun.com [47.90.199.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45EB2BD8 for ; Sun, 18 Sep 2022 05:29:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R751e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=chentao.kernel@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0VQ2EdcT_1663504150; Received: from VM20210331-5.tbsite.net(mailfrom:chentao.kernel@linux.alibaba.com fp:SMTPD_---0VQ2EdcT_1663504150) by smtp.aliyun-inc.com; Sun, 18 Sep 2022 20:29:25 +0800 From: Tao Chen To: Steven Rostedt , Ingo Molnar , Masami Hiramatsu , Tzvetomir Stoyanov Cc: linux-kernel@vger.kernel.org, Tao Chen Subject: [PATCH] tracing/eprobe: Fix alloc event dir failed when event name no set Date: Sun, 18 Sep 2022 20:29:08 +0800 Message-Id: <1663504148-40723-1-git-send-email-chentao.kernel@linux.alibaba.com> X-Mailer: git-send-email 2.2.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The event dir will alloc failed when event name no set, using the command: "echo "e:esys/ syscalls/sys_enter_openat file=3D\$filename:string" >> dynamic_events" It seems that dir name=3D"syscalls/sys_enter_openat" is not allowed in debugfs. So just use the "sys_enter_openat" as the event name. Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") Signed-off-by: Tao Chen Acked-by: Masami Hiramatsu (Google) --- kernel/trace/trace_eprobe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c index 1783e3478912..a8938e54cd34 100644 --- a/kernel/trace/trace_eprobe.c +++ b/kernel/trace/trace_eprobe.c @@ -968,8 +968,7 @@ static int __trace_eprobe_create(int argc, const char *= argv[]) } =20 if (!event) { - strscpy(buf1, argv[1], MAX_EVENT_NAME_LEN); - sanitize_event_name(buf1); + strscpy(buf1, sys_event, MAX_EVENT_NAME_LEN); event =3D buf1; } =20 --=20 2.32.0