[PATCH] kho: fix child node parsing for debugfs in/sub_fdts

ranxiaokai627 at 163.com ranxiaokai627 at 163.com
Sun Mar 8 20:35:30 PDT 2026


From: Ran Xiaokai <ran.xiaokai at zte.com.cn>

Commit e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
changed KHO_FDT_SUB_TREE_PROP_NAME from "fdt" to "preserved-data". However,
kho debugfs code still hard-coded the "fdt" string when parsing the
device tree, causing the debugfs node /debugfs/kho/in/sub_fdts/
fail to parse child nodes correctly.

Fix this by including the header file and using KHO_FDT_SUB_TREE_PROP_NAME
instead of the hard-coded string.

Fixes: e0c1731f5d57 ("kho: adopt radix tree for preserved memory tracking")
Signed-off-by: Ran Xiaokai <ran.xiaokai at zte.com.cn>
---
 kernel/liveupdate/kexec_handover_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/liveupdate/kexec_handover_debugfs.c b/kernel/liveupdate/kexec_handover_debugfs.c
index 3f395fbd978f..acf368222682 100644
--- a/kernel/liveupdate/kexec_handover_debugfs.c
+++ b/kernel/liveupdate/kexec_handover_debugfs.c
@@ -13,6 +13,7 @@
 #include <linux/io.h>
 #include <linux/libfdt.h>
 #include <linux/mm.h>
+#include <linux/kho/abi/kexec_handover.h>
 #include "kexec_handover_internal.h"
 
 static struct dentry *debugfs_root;
@@ -121,7 +122,7 @@ __init void kho_in_debugfs_init(struct kho_debugfs *dbg, const void *fdt)
 		const char *name = fdt_get_name(fdt, child, NULL);
 		const u64 *fdt_phys;
 
-		fdt_phys = fdt_getprop(fdt, child, "fdt", &len);
+		fdt_phys = fdt_getprop(fdt, child, KHO_FDT_SUB_TREE_PROP_NAME, &len);
 		if (!fdt_phys)
 			continue;
 		if (len != sizeof(*fdt_phys)) {
-- 
2.25.1




More information about the kexec mailing list