Skip to content

Commit 6769828

Browse files
committed
parisc: Prevent panic at system halt
When issuing a "shutdown -h now", the reboot syscall calls kernel_halt() which shouldn't return, otherwise one gets this panic: reboot: System halted Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000 CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 4.16.0-32bit+ #560 Backtrace: [<1018a694>] show_stack+0x18/0x28 [<106e68a8>] dump_stack+0x80/0x10c [<101a4df8>] panic+0xfc/0x290 [<101a90b8>] do_exit+0x73c/0x914 [<101c7e38>] SyS_reboot+0x190/0x1d4 [<1017e444>] syscall_exit+0x0/0x14 Fix it by letting machine_halt() call machine_power_off() which doesn't return. Signed-off-by: Helge Deller <[email protected]>
1 parent 71d577d commit 6769828

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

arch/parisc/kernel/process.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ void machine_restart(char *cmd)
112112

113113
}
114114

115-
void machine_halt(void)
116-
{
117-
/*
118-
** The LED/ChassisCodes are updated by the led_halt()
119-
** function, called by the reboot notifier chain.
120-
*/
121-
}
122-
123115
void (*chassis_power_off)(void);
124116

125117
/*
@@ -158,6 +150,11 @@ void machine_power_off(void)
158150
void (*pm_power_off)(void);
159151
EXPORT_SYMBOL(pm_power_off);
160152

153+
void machine_halt(void)
154+
{
155+
machine_power_off();
156+
}
157+
161158
void flush_thread(void)
162159
{
163160
/* Only needs to handle fpu stuff or perf monitors.

0 commit comments

Comments
 (0)