Merge tag 'kbuild-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[linux-2.6-microblaze.git] / lib / bug.c
index 8c98af0..8f9d537 100644 (file)
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -47,6 +47,7 @@
 #include <linux/bug.h>
 #include <linux/sched.h>
 #include <linux/rculist.h>
+#include <linux/ftrace.h>
 
 extern struct bug_entry __start___bug_table[], __stop___bug_table[];
 
@@ -90,8 +91,6 @@ void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
        char *secstrings;
        unsigned int i;
 
-       lockdep_assert_held(&module_mutex);
-
        mod->bug_table = NULL;
        mod->num_bugs = 0;
 
@@ -117,7 +116,6 @@ void module_bug_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
 
 void module_bug_cleanup(struct module *mod)
 {
-       lockdep_assert_held(&module_mutex);
        list_del_rcu(&mod->bug_list);
 }
 
@@ -153,6 +151,8 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
        if (!bug)
                return BUG_TRAP_TYPE_NONE;
 
+       disable_trace_on_warning();
+
        file = NULL;
        line = 0;
        warning = 0;