Skip to content

Commit bf8a1ab

Browse files
bauermannmpe
authored andcommitted
powerpc/kexec_file: Fix error code when trying to load kdump kernel
kexec_file_load() on powerpc doesn't support kdump kernels yet, so it returns -ENOTSUPP in that case. I've recently learned that this errno is internal to the kernel and isn't supposed to be exposed to userspace. Therefore, change to -EOPNOTSUPP which is defined in an uapi header. This does indeed make kexec-tools happier. Before the patch, on ppc64le: # ~bauermann/src/kexec-tools/build/sbin/kexec -s -p /boot/vmlinuz kexec_file_load failed: Unknown error 524 After the patch: # ~bauermann/src/kexec-tools/build/sbin/kexec -s -p /boot/vmlinuz kexec_file_load failed: Operation not supported Fixes: a045828 ("powerpc: Add support code for kexec_file_load()") Cc: [email protected] # v4.10+ Reported-by: Dave Young <[email protected]> Signed-off-by: Thiago Jung Bauermann <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: Dave Young <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
1 parent 7e14059 commit bf8a1ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/kernel/machine_kexec_file_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int arch_kexec_kernel_image_probe(struct kimage *image, void *buf,
4343

4444
/* We don't support crash kernels yet. */
4545
if (image->type == KEXEC_TYPE_CRASH)
46-
return -ENOTSUPP;
46+
return -EOPNOTSUPP;
4747

4848
for (i = 0; i < ARRAY_SIZE(kexec_file_loaders); i++) {
4949
fops = kexec_file_loaders[i];

0 commit comments

Comments
 (0)