summaryrefslogtreecommitdiff
path: root/kernel/printk/printk_safe.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/printk/printk_safe.c')
-rw-r--r--kernel/printk/printk_safe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/printk/printk_safe.c b/kernel/printk/printk_safe.c
index 86439fd20aab..2b35a9d3919d 100644
--- a/kernel/printk/printk_safe.c
+++ b/kernel/printk/printk_safe.c
@@ -44,7 +44,9 @@ bool is_printk_legacy_deferred(void)
* The per-CPU variable @printk_context can be read safely in any
* context. CPU migration is always disabled when set.
*/
- return (this_cpu_read(printk_context) || in_nmi());
+ return (force_legacy_kthread() ||
+ this_cpu_read(printk_context) ||
+ in_nmi());
}
asmlinkage int vprintk(const char *fmt, va_list args)