--- zzzz-none-000/linux-3.10.107/kernel/panic.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/kernel/panic.c 2021-11-10 11:53:56.000000000 +0000 @@ -27,13 +27,25 @@ #define PANIC_TIMER_STEP 100 #define PANIC_BLINK_SPD 18 +#if defined(CONFIG_AVM_ENHANCED) && defined(CONFIG_TFFS_PANIC_LOG) +#include +#include + +int panic_on_oops = 1; +#else int panic_on_oops = CONFIG_PANIC_ON_OOPS_VALUE; +#endif /* AVM_ENHANCED && CONFIG_TFFS_PANIC_LOG */ + static unsigned long tainted_mask; static int pause_on_oops; static int pause_on_oops_flag; static DEFINE_SPINLOCK(pause_on_oops_lock); +#ifdef CONFIG_AVM_ENHANCED +int panic_timeout = 5; +#else int panic_timeout; +#endif EXPORT_SYMBOL_GPL(panic_timeout); ATOMIC_NOTIFIER_HEAD(panic_notifier_list); @@ -123,10 +135,15 @@ */ smp_send_stop(); - kmsg_dump(KMSG_DUMP_PANIC); + /* + * Run any panic handlers, including those that might need to + * add information to the kmsg dump output. + */ atomic_notifier_call_chain(&panic_notifier_list, 0, buf); + kmsg_dump(KMSG_DUMP_PANIC); + bust_spinlocks(0); console_flush_on_panic();