From 8fefbc6d4b26604be3ce627910a22aaeb7c382fd Mon Sep 17 00:00:00 2001 From: Mark Tomlinson Date: Tue, 27 Nov 2018 09:57:23 +1300 Subject: tty/sysrq: Do not call sync directly from sysrq_do_reset() sysrq_do_reset() is called in softirq context, so it cannot call sync() directly. Instead, call orderly_reboot(), which creates a work item to run /sbin/reboot, or do emergency_sync and restart if the command fails. Signed-off-by: Mark Tomlinson Signed-off-by: Greg Kroah-Hartman --- drivers/tty/sysrq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 28fb20e9f984..1f03078ec352 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -653,8 +653,7 @@ static void sysrq_do_reset(struct timer_list *t) state->reset_requested = true; - ksys_sync(); - kernel_restart(NULL); + orderly_reboot(); } static void sysrq_handle_reset_request(struct sysrq_state *state) -- cgit v1.2.3