Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2373175pxb; Mon, 20 Sep 2021 20:32:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHZk0sgqXRBcikXsbdquRFwWb2We6a6+OTpPeUl+DneljlfCC4K1zlGiJN173cCmFsK/bK X-Received: by 2002:a05:6402:1a53:: with SMTP id bf19mr33203674edb.235.1632195163067; Mon, 20 Sep 2021 20:32:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632195163; cv=none; d=google.com; s=arc-20160816; b=ZvOb4bZxaJzgmoyVp0Pc7KoNfVmRhmAZP84IlVd/fw+iF+7NCwHm9UsEHICZ4qEcoL MXIgYPKKTNFXRkkeySr6/8Vz77j6ga6OxxMTQk83qL8qJWSCMi/vk9Xb24RjbRR448t8 A3/9LvtIlIJ636rE5gtc0z6ZiWdq1t95dBhu8wvyZ1GHTgdL167qbX6R02OSl3pOdPaR GIU5/2hRjqyQUqQsebC3jhhi0I9+W2qR8YoyxGovB2reXIHzU0SL/6rrVsz9a+AAOaoG oR2NXSm4MtGyIt+iD+nXKVOZljjdjuZPBxViq+zA8uQUgrnX7cOwWDI+At8ymD+y6q4D wO/A== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kBArGHZud2zWs8hcJCNce6rXm/UOvcLSYTO+74IiKxc=; b=RC7UGYkbdVVWGYRUe3T+7Sb2MBXQLkP+h8sqCqrBdIhuuC8PnaSmV+1/pAdIjsLAkY 2kgNtzuIL++dJ8L25FVfe8a0ATXjLJW0HllAWJdH5dwa43mEdM+ApAeC36NDfUc/J+F1 pe3Zrn89Jd5cFqg3XNmn/CI/sl9WeqYvF791ZMTYo7a/ErP/sb0V6j3ARNUE/oBkpVdC yfwVFuSECV1JJbUY1GkBmRKfN0JjleLEipI78zsWZ2wbsDdul8m0D94FKmK3DGikdCLO ISlmcDSJdSmXTecy83u5O4WkIKsFdh0+LDcbDLLN0/elBbxlU4VgF/xElOKA4927sYjz 951g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="E75AM/uo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si17900539eds.333.2021.09.20.20.32.19; Mon, 20 Sep 2021 20:32:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="E75AM/uo"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386080AbhITS7H (ORCPT + 99 others); Mon, 20 Sep 2021 14:59:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:33192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384540AbhITSsT (ORCPT ); Mon, 20 Sep 2021 14:48:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C8C476336D; Mon, 20 Sep 2021 17:33:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632159233; bh=9CdTvvhUJ6fs+lcYEoDJc3pDm6ZWgqub8UHDzlaahfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E75AM/uoddO5tBXo7RaHy2s/4NdxokNJPrVetH1wOMPZcQ71E8jWTlIE9Udy26vcF axotCiePTzAKkWZrFHoxKSwA7gwQNL1VY1NKII/mFAUl77/vegDXGgvnMtHvgNNSfy 40EjM8UhpL4lo5f37LS97qTwTJD3hOuxV/zkDdCM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Masami Hiramatsu , "Steven Rostedt (VMware)" , Sasha Levin Subject: [PATCH 5.14 130/168] tracing/boot: Fix a hist trigger dependency for boot time tracing Date: Mon, 20 Sep 2021 18:44:28 +0200 Message-Id: <20210920163925.940856792@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163921.633181900@linuxfoundation.org> References: <20210920163921.633181900@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masami Hiramatsu [ Upstream commit 6fe7c745f2acb73e4cc961d7f91125eef5a8861f ] Fixes a build error when CONFIG_HIST_TRIGGERS=n with boot-time tracing. Since the trigger_process_regex() is defined only when CONFIG_HIST_TRIGGERS=y, if it is disabled, the 'actions' event option also must be disabled. Link: https://lkml.kernel.org/r/162856123376.203126.582144262622247352.stgit@devnote2 Fixes: 81a59555ff15 ("tracing/boot: Add per-event settings") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Sasha Levin --- kernel/trace/trace_boot.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index 94ef2d099e32..d713714cba67 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c @@ -205,12 +205,15 @@ trace_boot_init_one_event(struct trace_array *tr, struct xbc_node *gnode, pr_err("Failed to apply filter: %s\n", buf); } - xbc_node_for_each_array_value(enode, "actions", anode, p) { - if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) - pr_err("action string is too long: %s\n", p); - else if (trigger_process_regex(file, buf) < 0) - pr_err("Failed to apply an action: %s\n", buf); - } + if (IS_ENABLED(CONFIG_HIST_TRIGGERS)) { + xbc_node_for_each_array_value(enode, "actions", anode, p) { + if (strlcpy(buf, p, ARRAY_SIZE(buf)) >= ARRAY_SIZE(buf)) + pr_err("action string is too long: %s\n", p); + else if (trigger_process_regex(file, buf) < 0) + pr_err("Failed to apply an action: %s\n", buf); + } + } else if (xbc_node_find_value(enode, "actions", NULL)) + pr_err("Failed to apply event actions because CONFIG_HIST_TRIGGERS is not set.\n"); if (xbc_node_find_value(enode, "enable", NULL)) { if (trace_event_enable_disable(file, 1, 0) < 0) -- 2.30.2