kernel/lib/ubsan.c
.. .. @@ -151,16 +151,7 @@ 151 151 152 152 current->in_ubsan--; 153 153 154 - if (panic_on_warn) {155 - /*156 - * This thread may hit another WARN() in the panic path.157 - * Resetting this prevents additional WARN() from panicking the158 - * system on this thread. Other threads are blocked by the159 - * panic_mutex in panic().160 - */161 - panic_on_warn = 0;162 - panic("panic_on_warn set ...\n");163 - }154 + check_panic_on_warn("UBSAN");164 155 } 165 156 166 157 void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs)