Skip to content

Commit ce77b75

Browse files
rosslagerwalljfvogel
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: 34480751 Signed-off-by: Dongli Zhang <[email protected]> Reviewed-by: Boris Ostrovsky <[email protected]> Reviewed-by: Joe Jin <[email protected]> (cherry picked from commit e628f8073fb3e28185ef898995cc11588c8b12be) Signed-off-by: Jack Vogel <[email protected]>
1 parent 116f84c commit ce77b75

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
@@ -205,7 +205,7 @@ static void do_poweroff(void)
205205
static void do_reboot(void)
206206
{
207207
shutting_down = SHUTDOWN_POWEROFF; /* ? */
208-
ctrl_alt_del();
208+
orderly_reboot();
209209
}
210210

211211
static struct shutdown_handler shutdown_handlers[] = {

0 commit comments

Comments
 (0)