From patchwork Fri Sep 24 12:43:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 514565 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp1253964ejj; Fri, 24 Sep 2021 06:03:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIL3nF8WupBb5zC5rb0S56OI/W/aN6WGj4mKF6q1/tBcu4f8kULRwbZuztOmwHmOUgDEU7 X-Received: by 2002:a02:5444:: with SMTP id t65mr9306670jaa.42.1632488606751; Fri, 24 Sep 2021 06:03:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632488606; cv=none; d=google.com; s=arc-20160816; b=McqDE+meneW9A4U6sdCDQzrbq4pynXqtcudRvnLQODWjwyfkZxXgf+PJcxmXUkGTYC H9Nvg/Am14EQjUcJEvoFo4AQOLL9G0gM5cGb1bcdWpZjelfBC/HvRxMDoloPeC9GVPG+ QTfS5OObihc2R6dwwNrAULfSYUOcKwpw2QqVwM27jb74c3lmMUKtArjR0oAdOo8lT/HC U6NOpt+wz3ge+nhaF29x/+MEzpYNem/xrTmAOqUYJ1AfW6zC2mw6U5VCd1qfvzHbC6XF 3z7j3m6hAXFrqfJWjWHrkO4Nkd8rkp12wKaHZ/7JvrHPDrpCITDmxIgoOgmpMe61Ov3s htcQ== 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=rSuJ27J7+/k8cEJHQTQvJTzCMigMijvEcV+85RrgYJY=; b=pu/KHdPXfnfrO1UkqrZLfdZtMbyHh0+LKdU8CBnwqzYZfyUE922CzyshHzXWjGei43 sQ5qtnKHb0vFxgRQMrhY36ufPD3ZT7RTWoYy3Q5G4tiQFoGbGemnlyoiq3km/6y0rrNu KZZzKsMqHovnLGhZ0eDP5etoynUfb9O0YXzzGc1BTWoyrZrZxqg4D/5v7eGO6G9ADJLV FaAZ9lZWPvgxEQIxs1HO6n9Z59GuIXERpqaJL1U5+gJZ92HXgYTT1VUF3dGKrZqLLhrj 3ATICr92fnBngTo1HY3Y16uvJgtcNfewnw8uPPgaFR7aJARKREaz8G8BMfMtt96nTXv+ SK5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JE+EGKBB; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 h15si9756452jaa.28.2021.09.24.06.03.26; Fri, 24 Sep 2021 06:03:26 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=JE+EGKBB; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S1345851AbhIXNEN (ORCPT + 11 others); Fri, 24 Sep 2021 09:04:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:59752 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344174AbhIXNCJ (ORCPT ); Fri, 24 Sep 2021 09:02:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CED9A61439; Fri, 24 Sep 2021 12:54:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632488069; bh=EblabyhP/ZG2Glv8/a6oYU1j3ijpHPJR3hduOs2nGkM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JE+EGKBBAo9lc92bDK/FXQgUfFgPDaXgyLENu2xvtyN7Jz23NTRkAyGSLFcDocKks b6L46An6Cccgl5rKfZv5T2tzxSW/Po0ifGPhB5KGpQ5wF9bTxR7xSr1skt3A4XrfhE XcMZYdO2NVzxKmR/dDrgbA7hvUgST8qFfht/dlFg= 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 040/100] tracing/boot: Fix to loop on only subkeys Date: Fri, 24 Sep 2021 14:43:49 +0200 Message-Id: <20210924124342.799797187@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210924124341.214446495@linuxfoundation.org> References: <20210924124341.214446495@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Masami Hiramatsu [ Upstream commit cfd799837dbc48499abb05d1891b3d9992354d3a ] Since the commit e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key") allows to co-exist a value node and key nodes under a node, xbc_node_for_each_child() is not only returning key node but also a value node. In the boot-time tracing using xbc_node_for_each_child() to iterate the events, groups and instances, but those must be key nodes. Thus it must use xbc_node_for_each_subkey(). Link: https://lkml.kernel.org/r/163112988361.74896.2267026262061819145.stgit@devnote2 Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Sasha Levin --- kernel/trace/trace_boot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.33.0 diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c index d713714cba67..4bd8f94a56c6 100644 --- a/kernel/trace/trace_boot.c +++ b/kernel/trace/trace_boot.c @@ -235,14 +235,14 @@ trace_boot_init_events(struct trace_array *tr, struct xbc_node *node) if (!node) return; /* per-event key starts with "event.GROUP.EVENT" */ - xbc_node_for_each_child(node, gnode) { + xbc_node_for_each_subkey(node, gnode) { data = xbc_node_get_data(gnode); if (!strcmp(data, "enable")) { enable_all = true; continue; } enable = false; - xbc_node_for_each_child(gnode, enode) { + xbc_node_for_each_subkey(gnode, enode) { data = xbc_node_get_data(enode); if (!strcmp(data, "enable")) { enable = true; @@ -338,7 +338,7 @@ trace_boot_init_instances(struct xbc_node *node) if (!node) return; - xbc_node_for_each_child(node, inode) { + xbc_node_for_each_subkey(node, inode) { p = xbc_node_get_data(inode); if (!p || *p == '\0') continue;