]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kexec: Fix checksum validation return code for kdump
authorPhilipp Rudo <prudo@linux.vnet.ibm.com>
Tue, 17 Oct 2017 10:28:08 +0000 (12:28 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 18 Oct 2017 12:11:16 +0000 (14:11 +0200)
commit274d03f83b2fb3d3f1a22c6b232af5bb98dca3bf
tree551f255180e547f153291d5efd7442caf066050b
parente51e226af3918f2a8552539bdae2c7907979c0ff
s390/kexec: Fix checksum validation return code for kdump

Before kexec boots to a crash kernel it checks whether the image in memory
changed after load. This is done by the function kdump_csum_valid, which
returns true, i.e. an int != 0, on success and 0 otherwise. In other words
when kdump_csum_valid returns an error code it means that the validation
succeeded. This is not only counterintuitive but also produces the wrong
result if the kernel was build without CONFIG_CRASH_DUMP. Fix this by
making kdump_csum_valid return a bool.

Signed-off-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/machine_kexec.c