[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200406174058.686436-1-leonardo@linux.ibm.com>
Date: Mon, 6 Apr 2020 14:40:59 -0300
From: Leonardo Bras <leonardo@...ux.ibm.com>
To: Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Enrico Weigelt <info@...ux.net>,
Thomas Gleixner <tglx@...utronix.de>,
Allison Randal <allison@...utok.net>,
Christophe Leroy <christophe.leroy@....fr>,
Leonardo Bras <leonardo@...ux.ibm.com>,
Nicholas Piggin <npiggin@...il.com>
Cc: linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] powerpc/crash: Use NMI context for printk after crashing other CPUs
Currently, if printk lock (logbuf_lock) is held by other thread during
crash, there is a chance of deadlocking the crash on next printk, and
blocking a possibly desired kdump.
After sending IPI to all other CPUs, make printk enter in NMI context,
as it will use per-cpu buffers to store the message, and avoid locking
logbuf_lock.
Signed-off-by: Leonardo Bras <leonardo@...ux.ibm.com>
---
arch/powerpc/kexec/crash.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kexec/crash.c b/arch/powerpc/kexec/crash.c
index d488311efab1..9b73e3991bf4 100644
--- a/arch/powerpc/kexec/crash.c
+++ b/arch/powerpc/kexec/crash.c
@@ -115,6 +115,7 @@ static void crash_kexec_prepare_cpus(int cpu)
crash_send_ipi(crash_ipi_callback);
smp_wmb();
+ printk_nmi_enter();
again:
/*
--
2.25.1
Powered by blists - more mailing lists