From mboxrd@z Thu Jan 1 00:00:00 1970 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 C7F10C433EF for ; Mon, 27 Jun 2022 02:19:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231583AbiF0CT2 (ORCPT ); Sun, 26 Jun 2022 22:19:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbiF0CTY (ORCPT ); Sun, 26 Jun 2022 22:19:24 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE142B8E for ; Sun, 26 Jun 2022 19:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1656296363; x=1687832363; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZOADVSvFWlwcn3svA+sGnjWnP7wCG1eDr3oTRjD+tgg=; b=Txj7pRDMEKMJH47EDpjKBHXs4s9ugWAHrxDECaHx1pV5sYBYF+0VuIp9 Un0znsB0BxoN7vIixETsBLrsn3drtgHLX56buYbuyNqPzx1Rohq2ocH10 A2Ey/QGASVqbDb6w9bTquqF0Yvo7MER7eMOFaFr8l157FGhSX8haNtt1Z s=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 26 Jun 2022 19:19:23 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jun 2022 19:19:23 -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; Sun, 26 Jun 2022 19:19:22 -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; Sun, 26 Jun 2022 19:19:21 -0700 From: Linyu Yuan To: Steven Rostedt , Masami Hiramatsu , Tom Zanussi CC: , Linyu Yuan Subject: [PATCH v7 2/4] tracing: eprobe: remove duplicate is_good_name() operation Date: Mon, 27 Jun 2022 10:19:06 +0800 Message-ID: <1656296348-16111-3-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1656296348-16111-1-git-send-email-quic_linyyuan@quicinc.com> References: <1656296348-16111-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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org traceprobe_parse_event_name() already validate SYSTEM and EVENT name, there is no need to call is_good_name() after it. Acked-by: Masami Hiramatsu (Google) Signed-off-by: Linyu Yuan --- v2: drop v1 change as it is NACK. add it to remove duplicate is_good_name(). v3: move it as first patch. v4: no change v5: add Acked-by tag v6: keep is_good_name() check for group and event name add trace_probe_log_set_index(1) to report correct error message. v7: move trace_probe_log_set_index() to seprate patch#1 kernel/trace/trace_eprobe.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/trace/trace_eprobe.c b/kernel/trace/trace_eprobe.c index b805b57..8979cb9e 100644 --- a/kernel/trace/trace_eprobe.c +++ b/kernel/trace/trace_eprobe.c @@ -887,8 +887,6 @@ static int __trace_eprobe_create(int argc, const char *argv[]) sys_event - argv[1]); if (ret || !sys_name) 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