Patch "tracing/boot: Fix to loop on only subkeys" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tracing/boot: Fix to loop on only subkeys

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tracing-boot-fix-to-loop-on-only-subkeys.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1c2fb94352c41733ebe7e278af75e30ae8dc2cb2
Author: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Date:   Thu Sep 9 04:38:03 2021 +0900

    tracing/boot: Fix to loop on only subkeys
    
    [ 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 <mhiramat@xxxxxxxxxx>
    Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux