Merge tag 'mm-nonmm-stable-2024-03-14-09-36' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / kernel / panic.c
index f22d8f33ea14752819044715e1dfa3234fc36198..747c3f3d289a234832e6cf5774d92a20951e3cb3 100644 (file)
@@ -73,6 +73,7 @@ EXPORT_SYMBOL_GPL(panic_timeout);
 #define PANIC_PRINT_FTRACE_INFO                0x00000010
 #define PANIC_PRINT_ALL_PRINTK_MSG     0x00000020
 #define PANIC_PRINT_ALL_CPU_BT         0x00000040
+#define PANIC_PRINT_BLOCKED_TASKS      0x00000080
 unsigned long panic_print;
 
 ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
@@ -227,6 +228,9 @@ static void panic_print_sys_info(bool console_flush)
 
        if (panic_print & PANIC_PRINT_FTRACE_INFO)
                ftrace_dump(DUMP_ALL);
+
+       if (panic_print & PANIC_PRINT_BLOCKED_TASKS)
+               show_state_filter(TASK_UNINTERRUPTIBLE);
 }
 
 void check_panic_on_warn(const char *origin)
@@ -674,8 +678,13 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
                pr_warn("WARNING: CPU: %d PID: %d at %pS\n",
                        raw_smp_processor_id(), current->pid, caller);
 
+#pragma GCC diagnostic push
+#ifndef __clang__
+#pragma GCC diagnostic ignored "-Wsuggest-attribute=format"
+#endif
        if (args)
                vprintk(args->fmt, args->args);
+#pragma GCC diagnostic pop
 
        print_modules();