diff options
| author | 2017-11-29 12:47:41 +1100 | |
|---|---|---|
| committer | 2017-11-29 12:47:41 +1100 | |
| commit | cf40a76e7d5874bb25f4404eecc58a2e033af885 (patch) | |
| tree | 8fd81cbea03c87b3d41d7ae5b1d11eadd35d6ef5 /lib/bug.c | |
| parent | security: fix description of values returned by cap_inode_need_killpriv (diff) | |
| parent | Linux 4.15-rc1 (diff) | |
| download | linux-dev-cf40a76e7d5874bb25f4404eecc58a2e033af885.tar.xz linux-dev-cf40a76e7d5874bb25f4404eecc58a2e033af885.zip | |
Merge tag 'v4.15-rc1' into next-seccomp
Linux 4.15-rc1
Diffstat (limited to 'lib/bug.c')
| -rw-r--r-- | lib/bug.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/bug.c b/lib/bug.c index a6a1137d06db..c1b0fad31b10 100644 --- a/lib/bug.c +++ b/lib/bug.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* Generic support for BUG() @@ -185,7 +186,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) return BUG_TRAP_TYPE_WARN; } - printk(KERN_DEFAULT "------------[ cut here ]------------\n"); + printk(KERN_DEFAULT CUT_HERE); if (file) pr_crit("kernel BUG at %s:%u!\n", file, line); @@ -195,3 +196,26 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs) return BUG_TRAP_TYPE_BUG; } + +static void clear_once_table(struct bug_entry *start, struct bug_entry *end) +{ + struct bug_entry *bug; + + for (bug = start; bug < end; bug++) + bug->flags &= ~BUGFLAG_DONE; +} + +void generic_bug_clear_once(void) +{ +#ifdef CONFIG_MODULES + struct module *mod; + + rcu_read_lock_sched(); + list_for_each_entry_rcu(mod, &module_bug_list, bug_list) + clear_once_table(mod->bug_table, + mod->bug_table + mod->num_bugs); + rcu_read_unlock_sched(); +#endif + + clear_once_table(__start___bug_table, __stop___bug_table); +} |
