.. | .. |
---|
92 | 92 | pr_err("==================================================================\n"); |
---|
93 | 93 | add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE); |
---|
94 | 94 | spin_unlock_irqrestore(&report_lock, *flags); |
---|
95 | | - if (panic_on_warn && !test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags)) { |
---|
96 | | - /* |
---|
97 | | - * This thread may hit another WARN() in the panic path. |
---|
98 | | - * Resetting this prevents additional WARN() from panicking the |
---|
99 | | - * system on this thread. Other threads are blocked by the |
---|
100 | | - * panic_mutex in panic(). |
---|
101 | | - */ |
---|
102 | | - panic_on_warn = 0; |
---|
103 | | - panic("panic_on_warn set ...\n"); |
---|
104 | | - } |
---|
| 95 | + if (!test_bit(KASAN_BIT_MULTI_SHOT, &kasan_flags)) |
---|
| 96 | + check_panic_on_warn("KASAN"); |
---|
105 | 97 | #ifdef CONFIG_KASAN_HW_TAGS |
---|
106 | 98 | if (kasan_flag_panic) |
---|
107 | 99 | panic("kasan.fault=panic set ...\n"); |
---|