[PATCH 1/2] dyndbg: fix incorrect mod_ct value in dynamic_debug_init()
From: Yuntao Wang
Date: Tue Aug 11 2026 - 08:23:40 EST
Suppose all `struct _ddebug` instances belong to the same module, mod_ct
should be 1, but it is currently 0.
Fix it.
Signed-off-by: Yuntao Wang <yuntao.wang@xxxxxxxxx>
---
lib/dynamic_debug.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index 18a71a9108d3..16fad5454d6a 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -1456,6 +1456,8 @@ static int __init dynamic_debug_init(void)
iter_mod_start = iter;
}
}
+
+ mod_ct++;
di.num_descs = mod_sites;
di.descs = iter_mod_start;
ret = ddebug_add_module(&di, modname);
--
2.55.0