Merge tag 'hardening-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees...
[platform/kernel/linux-starfive.git] / mm / kfence / report.c
index 46ecea1..60205f1 100644 (file)
@@ -273,8 +273,7 @@ void kfence_report_error(unsigned long address, bool is_write, struct pt_regs *r
 
        lockdep_on();
 
-       if (panic_on_warn)
-               panic("panic_on_warn set ...\n");
+       check_panic_on_warn("KFENCE");
 
        /* We encountered a memory safety error, taint the kernel! */
        add_taint(TAINT_BAD_PAGE, LOCKDEP_STILL_OK);