mirror of
https://github.com/torvalds/linux.git
synced 2025-12-01 07:26:02 +07:00
panic: Mark emergency section in warn
Mark the full contents of __warn() as an emergency section. In this section, every printk() call will attempt to directly flush to the consoles using the EMERGENCY priority. Co-developed-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Thomas Gleixner (Intel) <tglx@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20240820063001.36405-33-john.ogness@linutronix.de Signed-off-by: Petr Mladek <pmladek@suse.com>
This commit is contained in:
committed by
Petr Mladek
parent
ecb5e1aa82
commit
4833794db6
@@ -718,6 +718,8 @@ struct warn_args {
|
|||||||
void __warn(const char *file, int line, void *caller, unsigned taint,
|
void __warn(const char *file, int line, void *caller, unsigned taint,
|
||||||
struct pt_regs *regs, struct warn_args *args)
|
struct pt_regs *regs, struct warn_args *args)
|
||||||
{
|
{
|
||||||
|
nbcon_cpu_emergency_enter();
|
||||||
|
|
||||||
disable_trace_on_warning();
|
disable_trace_on_warning();
|
||||||
|
|
||||||
if (file)
|
if (file)
|
||||||
@@ -753,6 +755,8 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
|
|||||||
|
|
||||||
/* Just a warning, don't kill lockdep. */
|
/* Just a warning, don't kill lockdep. */
|
||||||
add_taint(taint, LOCKDEP_STILL_OK);
|
add_taint(taint, LOCKDEP_STILL_OK);
|
||||||
|
|
||||||
|
nbcon_cpu_emergency_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BUG
|
#ifdef CONFIG_BUG
|
||||||
|
|||||||
Reference in New Issue
Block a user