* [for-next][PATCH] tracing/boot: Fix to loop on only subkeys
@ 2021-09-09 12:57 Steven Rostedt
0 siblings, 0 replies; only message in thread
From: Steven Rostedt @ 2021-09-09 12:57 UTC (permalink / raw)
To: LKML; +Cc: Ingo Molnar, Andrew Morton, Masami Hiramatsu
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
for-next
Head SHA1: cfd799837dbc48499abb05d1891b3d9992354d3a
Masami Hiramatsu (1):
tracing/boot: Fix to loop on only subkeys
----
kernel/trace/trace_boot.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---------------------------
commit cfd799837dbc48499abb05d1891b3d9992354d3a
Author: Masami Hiramatsu <mhiramat@kernel.org>
Date: Thu Sep 9 04:38:03 2021 +0900
tracing/boot: Fix to loop on only subkeys
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 <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
diff --git a/kernel/trace/trace_boot.c b/kernel/trace/trace_boot.c
index 1060b0446032..388e65d05978 100644
--- a/kernel/trace/trace_boot.c
+++ b/kernel/trace/trace_boot.c
@@ -522,14 +522,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;
@@ -625,7 +625,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;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-09 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09 12:57 [for-next][PATCH] tracing/boot: Fix to loop on only subkeys Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).