Skip to content

Commit 9e9236d

Browse files
rosslagerwallBrian Maly
authored andcommitted
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 <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Juergen Gross <[email protected]> (cherry picked from commit 67f43c9) Orabug: 34480732 Signed-off-by: Dongli Zhang <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Reviewed-by: Joe Jin <[email protected]> Signed-off-by: Brian Maly <[email protected]>
1 parent 7bb82c2 commit 9e9236d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/manage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static void do_poweroff(void)
204204
static void do_reboot(void)
205205
{
206206
shutting_down = SHUTDOWN_POWEROFF; /* ? */
207-
ctrl_alt_del();
207+
orderly_reboot();
208208
}
209209

210210
static struct shutdown_handler shutdown_handlers[] = {

0 commit comments

Comments
 (0)