summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDmitry Osipenko <dmitry.osipenko@collabora.com>2022-05-25 00:21:18 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-05-25 14:51:40 +0200
commitda007f171fc9dd993d03a360b515cac1c87921bb (patch)
tree290a6033a420fbba35dd2072c937472bab9476e0 /arch
parentcfd6d63e596552e1a5bf38bb889997b656475032 (diff)
downloadlinux-da007f171fc9dd993d03a360b515cac1c87921bb.tar.bz2
kernel/reboot: Change registration order of legacy power-off handler
We're unconditionally registering sys-off handler for the legacy pm_power_off() callback, this causes problem for platforms that don't use power-off handlers at all and should be halted. Now reboot syscall assumes that there is a power-off handler installed and tries to power off system instead of halting it. To fix the trouble, move the handler's registration to the reboot syscall and check the pm_power_off() presence. Fixes: 0e2110d2e910 ("kernel/reboot: Add kernel_can_power_off()") Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions