mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
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 <mark.tomlinson@alliedtelesis.co.nz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
85b5c1dd04
commit
8fefbc6d4b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user