Skip to contentSkip to conversation

mn10300: Fix up __bug_table handling in module loader.

PATCH New David Howells 1 participant 1 message Aug 4, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mn10300: Fix up __bug_table handling in module loader.

From: Paul Mundt <[email protected]>

Platforms that are using GENERIC_BUG must call in to module_bug_finalize()/module_bug_cleanup() in order to scan modules with their own __bug_table sections that are otherwise unaccounted.

---

 arch/mn10300/kernel/module.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
arch/mn10300/kernel/module.c +3 -1
index 0e4d2f6..8fa3689 100644
@@ -24,6 +24,7 @@
 #include <linux/fs.h>
 #include <linux/string.h>
 #include <linux/kernel.h>
+#include <linux/bug.h>
 
 #if 0
 #define DEBUGP printk
@@ -195,7 +196,7 @@ int module_finalize(const Elf_Ehdr *hdr,
 		    const Elf_Shdr *sechdrs,
 		    struct module *me)
 {
-	return 0;
+	return module_bug_finalize(hdr, sechdrs, me);
 }
 
 /*
@@ -203,4 +204,5 @@ int module_finalize(const Elf_Ehdr *hdr,
  */
 void module_arch_cleanup(struct module *mod)
 {
+	module_bug_cleanup(mod);
 }