hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/mm/kasan/report.c
....@@ -92,16 +92,8 @@
9292 pr_err("==================================================================\n");
9393 add_taint(TAINT_BAD_PAGE, LOCKDEP_NOW_UNRELIABLE);
9494 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");
10597 #ifdef CONFIG_KASAN_HW_TAGS
10698 if (kasan_flag_panic)
10799 panic("kasan.fault=panic set ...\n");