Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2610058ioo; Sat, 28 May 2022 20:35:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2CoMgnAIBDdfmXcYjafVkCK/4QHSfTX5W0FsLXOE6doR0lG8b3g9ZyCmnl/xiWlyArtY5 X-Received: by 2002:a17:90b:1b4d:b0:1df:ce69:77b9 with SMTP id nv13-20020a17090b1b4d00b001dfce6977b9mr16261451pjb.179.1653795329365; Sat, 28 May 2022 20:35:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653795329; cv=none; d=google.com; s=arc-20160816; b=SsDtw6IzSwDLbFzHoYDvGKFPF/7A8WyuKdVlto0g8fsXGl4dmyRku3qz1E2fCbK8pQ vqwz24DBRVUrWkq7O97OGb4O0S27s6POhrAMBKcBhvsfA+Xnm3ZRAs3iMlg7vgM4Y+s0 tGSSMIjPTXhr3l7Jxktee56gAiUslr+bh8amyb+eRwcf50Th9kdn8nsRohB04nj1uF3u 0dZftXYqPBYpcV0jEjI6CYxO7eg0nfBUVwlBzEu8tL7M6FqZSJs/9xiyolj20E8jBSRZ GCjty9sp0ZzF/IPwMIduLPD9ILvq9lpaZGcbg/uew2I4hZAM8FPWevGNVQFuIZaGwmXm bBjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WGlVSOwfybXCFZgxHyal61TawoAb6vp6CRxsR8ZXmeE=; b=jaQm4K9Toi/8tYqXBNu0p1Kq3qrDOzZWK3xdhRHwkfnQvfNDts7ZWIDE2KaZVU4gHf 4Ub92/tLl4pepuLIHaFZQnXA9Sx45aM/jQeWM3LZ5LFcKUFy5HYR32VUgt9fSPH7P6Eh /MBUyvo2IOKZDIDukRKDmIfbvD1/UuMMHm3E7DpF6SR67v0S0kn5YpP2hZ5iomgNhn0V Yn/oMo1GHi6+/Lqo2FVEyA30mm+9FMQO3DiI/KPdnwN1zHsTAK7+KYoU+VVZz48Cja6J h9UwhhEgh6gfJvBMkP7O7/jlfDKIBL6s0cFdgE9LF31qvQLcuQz0oJNm4BwlVAWthplP VpjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=jbILLlqf; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o3-20020a170902d4c300b00163852a9881si11313459plg.343.2022.05.28.20.35.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 20:35:29 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=jbILLlqf; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B18835A14A; Sat, 28 May 2022 20:35:27 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230272AbiE2DfS (ORCPT + 99 others); Sat, 28 May 2022 23:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbiE2DfI (ORCPT ); Sat, 28 May 2022 23:35:08 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9048614E for ; Sat, 28 May 2022 20:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653795306; x=1685331306; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WGlVSOwfybXCFZgxHyal61TawoAb6vp6CRxsR8ZXmeE=; b=jbILLlqfhWCqUhuPXl+ct0QqCnfCVL25z9TYcxv29TJm0S9uoFgtbZuc i/VCKjLDCFBwl4hZMCd4HlztLvTAbhCzHlrrpaKTKa85kEM7BSxi2MPdt 3FU6r6NZZN/o8LPfq7uZ19Leddpt+UoP4kz/0STiK1S/g2LjvtOxyGKmj o=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 28 May 2022 20:35:06 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 May 2022 20:35:06 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sat, 28 May 2022 20:35:05 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Sat, 28 May 2022 20:35:03 -0700 From: Linyu Yuan To: Steven Rostedt , Masami Hiramatsu , Tom Zanussi , Ingo Molnar CC: , Linyu Yuan Subject: [PATCH v2 2/2] tracing: eprobe: remove duplicate is_good_name() operation Date: Sun, 29 May 2022 11:34:54 +0800 Message-ID: <1653795294-19764-3-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1653795294-19764-1-git-send-email-quic_linyyuan@quicinc.com> References: <1653795294-19764-1-git-send-email-quic_linyyuan@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org traceprobe_parse_event_name() already validate group and event name, there is no need to call is_good_name() after it. Signed-off-by: Linyu Yuan --- v2: drop v1 change as it is NACK. add it to remove duplicate is_good_name(). kernel/trace/trace_eprobe.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c index 13cd7fc..2ee041d 100644 --- a/kernel/trace/trace_eprobe.c +++ b/kernel/trace/trace_eprobe.c @@ -883,15 +883,11 @@ static int __trace_eprobe_create(int argc, const char *argv[]) sanitize_event_name(buf1); event = buf1; } - if (!is_good_name(event) || !is_good_name(group)) - goto parse_error; sys_event = argv[1]; ret = traceprobe_parse_event_name(&sys_event, &sys_name, buf2, 0); if (ret != TP_ENAME_GROUP_EVENT) goto parse_error; - if (!is_good_name(sys_event) || !is_good_name(sys_name)) - goto parse_error; mutex_lock(&event_mutex); event_call = find_and_get_event(sys_name, sys_event); -- 2.7.4