diff mbox series

[03/95] alpha: replace bogus in_interrupt()

Message ID 20201216044229.2LRiyYBCE%akpm@linux-foundation.org (mailing list archive)
State New, archived
Headers show
Series [01/95] mm: fix a race on nr_swap_pages | expand

Commit Message

Andrew Morton Dec. 16, 2020, 4:42 a.m. UTC
From: Thomas Gleixner <tglx@linutronix.de>
Subject: alpha: replace bogus in_interrupt()

in_interrupt() is true for a variety of things including bottom half
disabled regions.  Deducing hard interrupt context from it is dubious at
best.

Use in_irq() which is true if called in hard interrupt context.  Otherwise
calling irq_exit() would do more harm than good.

Link: https://lkml.kernel.org/r/20201113135832.2202833-1-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Tested-by: Serge Belyshev <belyshev@depni.sinp.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/alpha/kernel/process.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

--- a/arch/alpha/kernel/process.c~alpha-replace-bogus-in_interrupt
+++ a/arch/alpha/kernel/process.c
@@ -134,7 +134,7 @@  common_shutdown_1(void *generic_ptr)
 #ifdef CONFIG_DUMMY_CONSOLE
 		/* If we've gotten here after SysRq-b, leave interrupt
 		   context before taking over the console. */
-		if (in_interrupt())
+		if (in_irq())
 			irq_exit();
 		/* This has the effect of resetting the VGA video origin.  */
 		console_lock();