I am not very familiar with the code, but I think we shouldn't hit that
WARN_ON_ONCE. Could you please try with the follow patch to see
which section caused this issue?
Thanks,
Song
diff --git i/kernel/module/main.c w/kernel/module/main.c
index 0f9183f1ca9f..caf3d30cd133 100644
--- i/kernel/module/main.c
+++ w/kernel/module/main.c
@@ -1537,8 +1537,11 @@ static void __layout_sections(struct module
*mod, struct load_info *info, bool i
|| is_init != module_init_layout_section(sname))
continue;
- if (WARN_ON_ONCE(type == MOD_INVALID))
+ if (WARN_ON_ONCE(type == MOD_INVALID)) {
+ pr_warn("%s: section %s (sh_flags
%llx) matched to MOD_INVALID\n", __func__,
+ sname, s->sh_flags);
continue;
+ }
s->sh_entsize =
module_get_offset_and_type(mod, type, s, i);
pr_debug("\t%s\n", sname);