diff options
author | Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz> | 2018-11-26 15:57:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-05 06:02:12 -0500 |
commit | 8fefbc6d4b26604be3ce627910a22aaeb7c382fd (patch) | |
tree | 37d65162a20d4e4861a33436000fd6e4b5d5d8bf | |
parent | 85b5c1dd04560f95d10c9eee71ba45adaa87deec (diff) |
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>
-rw-r--r-- | drivers/tty/sysrq.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
653 | 653 | ||
654 | state->reset_requested = true; | 654 | state->reset_requested = true; |
655 | 655 | ||
656 | ksys_sync(); | 656 | orderly_reboot(); |
657 | kernel_restart(NULL); | ||
658 | } | 657 | } |
659 | 658 | ||
660 | static void sysrq_handle_reset_request(struct sysrq_state *state) | 659 | static void sysrq_handle_reset_request(struct sysrq_state *state) |