[PATCH 1/2] mtdoops: do not schedule work if we are going to die

Aaro Koskinen aaro.koskinen at nokia.com
Thu Oct 1 11:16:55 EDT 2009


If panic_on_oops is set, the log should be written right away.

Signed-off-by: Aaro Koskinen <aaro.koskinen at nokia.com>
---
 drivers/mtd/mtdoops.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
index 1060337..ac67833 100644
--- a/drivers/mtd/mtdoops.c
+++ b/drivers/mtd/mtdoops.c
@@ -335,7 +335,7 @@ static void mtdoops_console_sync(void)
 	cxt->ready = 0;
 	spin_unlock_irqrestore(&cxt->writecount_lock, flags);
 
-	if (mtd->panic_write && in_interrupt())
+	if (mtd->panic_write && (in_interrupt() || panic_on_oops))
 		/* Interrupt context, we're going to panic so try and log */
 		mtdoops_write(cxt, 1);
 	else
-- 
1.5.4.3




More information about the linux-mtd mailing list