Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/kexec: change return value of machine_kexec_prepare

Returning -ENOSYS on kexec_load() is a bad idea since user space cannot
tell if the system call is not implmented or if it failed.
Use -EOPNOTSUPP in case somebody tries a kexec_load on a NSS image based
kernel instead.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Heiko Carstens and committed by
Martin Schwidefsky
d978386e a8f6db4d

+1 -1
+1 -1
arch/s390/kernel/machine_kexec.c
··· 159 159 160 160 /* Can't replace kernel image since it is read-only. */ 161 161 if (ipl_flags & IPL_NSS_VALID) 162 - return -ENOSYS; 162 + return -EOPNOTSUPP; 163 163 164 164 if (image->type == KEXEC_TYPE_CRASH) 165 165 return machine_kexec_prepare_kdump();