From 67f43c9c6a47776493f790f5ee03d76974e1b39d Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Mon, 27 Jun 2022 15:28:22 +0100 Subject: xen/manage: Use orderly_reboot() to reboot Currently when the toolstack issues a reboot, it gets translated into a call to ctrl_alt_del(). But tying reboot to ctrl-alt-del means rebooting may fail if e.g. the user has masked the ctrl-alt-del.target under systemd. A previous attempt to fix this issue made a change that sets the kernel.ctrl-alt-del sysctl to 1 before ctrl_alt_del() is called. However, this doesn't give userspace the opportunity to block rebooting or even do any cleanup or syncing. Instead, call orderly_reboot() which will call the "reboot" command, giving userspace the opportunity to block it or perform the usual reboot process while being independent of the ctrl-alt-del behaviour. It also matches what happens in the shutdown case. Signed-off-by: Ross Lagerwall Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20220627142822.3612106-1-ross.lagerwall@citrix.com Signed-off-by: Juergen Gross --- drivers/xen/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/xen/manage.c') diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 3d5a384d65f7..c16df629907e 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -205,7 +205,7 @@ static void do_poweroff(void) static void do_reboot(void) { shutting_down = SHUTDOWN_POWEROFF; /* ? */ - ctrl_alt_del(); + orderly_reboot(); } static struct shutdown_handler shutdown_handlers[] = { -- cgit v1.2.3-58-ga151