lkml.org 
[lkml]   [2017]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC][PATCHv2 6/8] kexec: switch to printk.emergency mode in unsafe places
Date
Switch to printk emergency mode in kernel_kexec(), this
lets us to immediately flush pending kernel message to
the console and to avoid potentially unsafe calls into
the scheduler.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
kernel/kexec_core.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c
index bfe62d5b3872..5684ba36ec15 100644
--- a/kernel/kexec_core.c
+++ b/kernel/kexec_core.c
@@ -1496,6 +1496,8 @@ int kernel_kexec(void)
goto Unlock;
}

+ printk_emergency_begin();
+
#ifdef CONFIG_KEXEC_JUMP
if (kexec_image->preserve_context) {
lock_system_sleep();
@@ -1565,6 +1567,8 @@ int kernel_kexec(void)
}
#endif

+ printk_emergency_end();
+
Unlock:
mutex_unlock(&kexec_mutex);
return error;
--
2.12.2
\
 
 \ /
  Last update: 2017-03-29 11:30    [W:0.195 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site