diff options
| author | Mark Brown <broonie@kernel.org> | 2026-09-14 14:46:41 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-14 14:46:41 +0100 |
| commit | 299a21e114fce6f21c736b240be798b03af13c50 (patch) | |
| tree | e65fecfb9a615d60e06e476bda514e4afe32783f /arch | |
| parent | 0822184edd276b04c032914f154295ebb34fa059 (diff) | |
| parent | a901b0778ae82d46084b55237e65d3a7bb5f0c86 (diff) | |
| download | linux-next-299a21e114fce6f21c736b240be798b03af13c50.tar.gz linux-next-299a21e114fce6f21c736b240be798b03af13c50.zip | |
Merge branch 'kexec-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/liveupdate/linux.git
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm64/kernel/kexec_image.c | 4 | ||||
| -rw-r--r-- | arch/loongarch/kernel/kexec_efi.c | 4 | ||||
| -rw-r--r-- | arch/riscv/kernel/kexec_image.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm64/kernel/kexec_image.c b/arch/arm64/kernel/kexec_image.c index b70f4df15a1a..101259874d44 100644 --- a/arch/arm64/kernel/kexec_image.c +++ b/arch/arm64/kernel/kexec_image.c @@ -25,10 +25,10 @@ static int image_probe(const char *kernel_buf, unsigned long kernel_len) (const struct arm64_image_header *)(kernel_buf); if (!h || (kernel_len < sizeof(*h))) - return -EINVAL; + return -ENOEXEC; if (memcmp(&h->magic, ARM64_IMAGE_MAGIC, sizeof(h->magic))) - return -EINVAL; + return -ENOEXEC; return 0; } diff --git a/arch/loongarch/kernel/kexec_efi.c b/arch/loongarch/kernel/kexec_efi.c index 5ee78ebb1546..28a1d0420ba3 100644 --- a/arch/loongarch/kernel/kexec_efi.c +++ b/arch/loongarch/kernel/kexec_efi.c @@ -24,12 +24,12 @@ static int efi_kexec_probe(const char *kernel_buf, unsigned long kernel_len) if (!h || (kernel_len < sizeof(*h))) { kexec_dprintk("No LoongArch image header.\n"); - return -EINVAL; + return -ENOEXEC; } if (!loongarch_header_check_dos_sig(h)) { kexec_dprintk("No LoongArch PE image header.\n"); - return -EINVAL; + return -ENOEXEC; } return 0; diff --git a/arch/riscv/kernel/kexec_image.c b/arch/riscv/kernel/kexec_image.c index 51dc89259f16..963a25f5b55b 100644 --- a/arch/riscv/kernel/kexec_image.c +++ b/arch/riscv/kernel/kexec_image.c @@ -20,7 +20,7 @@ static int image_probe(const char *kernel_buf, unsigned long kernel_len) const struct riscv_image_header *h = (const struct riscv_image_header *)kernel_buf; if (!h || kernel_len < sizeof(*h)) - return -EINVAL; + return -ENOEXEC; /* According to Documentation/arch/riscv/boot-image-header.rst, * use "magic2" field to check when version >= 0.2. @@ -28,7 +28,7 @@ static int image_probe(const char *kernel_buf, unsigned long kernel_len) if (h->version >= RISCV_HEADER_VERSION && memcmp(&h->magic2, RISCV_IMAGE_MAGIC2, sizeof(h->magic2))) - return -EINVAL; + return -ENOEXEC; return 0; } |
