Skip to content

Commit

Permalink
s390/kexec: change return value of machine_kexec_prepare
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Sep 26, 2012
1 parent a8f6db4 commit d978386
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/kernel/machine_kexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int machine_kexec_prepare(struct kimage *image)

/* Can't replace kernel image since it is read-only. */
if (ipl_flags & IPL_NSS_VALID)
return -ENOSYS;
return -EOPNOTSUPP;

if (image->type == KEXEC_TYPE_CRASH)
return machine_kexec_prepare_kdump();
Expand Down

0 comments on commit d978386

Please sign in to comment.