summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/machine_kexec.c
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2018-04-04 14:42:41 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-04-10 07:39:00 +0200
commit3b9678472bab86ae654cf2c18d5dd551558045be (patch)
treea952f6901e8b0bec9f84e60099c502b4e13cf78f /arch/s390/kernel/machine_kexec.c
parent0649685073422af82ab8e7d9119b9991403851a6 (diff)
s390/ipl: correct kdump reipl block checksum calculation
s390 kdump reipl implementation relies on os_info kernel structure residing in old memory being dumped. os_info contains reipl block, which is used (if valid) by the kdump kernel for reipl parameters. The problem is that the reipl block and its checksum inside os_info is updated only when /sys/firmware/reipl/reipl_type is written. This sets an offset of a reipl block for "reipl_type" and re-calculates reipl block checksum. Any further alteration of values under /sys/firmware/reipl/{reipl_type}/ without subsequent write to /sys/firmware/reipl/reipl_type lead to incorrect os_info reipl block checksum. In such a case kdump kernel ignores it and reboots using default logic. To fix this, os_info reipl block update is moved right before kdump execution. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/machine_kexec.c')
-rw-r--r--arch/s390/kernel/machine_kexec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/machine_kexec.c b/arch/s390/kernel/machine_kexec.c
index 9adae2a1e1a0..b7020e721ae3 100644
--- a/arch/s390/kernel/machine_kexec.c
+++ b/arch/s390/kernel/machine_kexec.c
@@ -252,6 +252,7 @@ void machine_shutdown(void)
void machine_crash_shutdown(struct pt_regs *regs)
{
+ set_os_info_reipl_block();
}
/*