Patch "arm64: kexec: Fix missing error code 'ret' warning in load_other_segments()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    arm64: kexec: Fix missing error code 'ret' warning in load_other_segments()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-kexec-fix-missing-error-code-ret-warning-in-lo.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 198d369ae466a2c60e5c275010262be353f5fd53
Author: Lakshmi Ramasubramanian <nramas@xxxxxxxxxxxxxxxxxxx>
Date:   Thu Dec 9 17:01:21 2021 -0800

    arm64: kexec: Fix missing error code 'ret' warning in load_other_segments()
    
    [ Upstream commit 9c5d89bc10551f1aecd768b00fca3339a7b8c8ee ]
    
    Since commit ac10be5cdbfa ("arm64: Use common
    of_kexec_alloc_and_setup_fdt()"), smatch reports the following warning:
    
      arch/arm64/kernel/machine_kexec_file.c:152 load_other_segments()
      warn: missing error code 'ret'
    
    Return code is not set to an error code in load_other_segments() when
    of_kexec_alloc_and_setup_fdt() call returns a NULL dtb. This results
    in status success (return code set to 0) being returned from
    load_other_segments().
    
    Set return code to -EINVAL if of_kexec_alloc_and_setup_fdt() returns
    NULL dtb.
    
    Signed-off-by: Lakshmi Ramasubramanian <nramas@xxxxxxxxxxxxxxxxxxx>
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Fixes: ac10be5cdbfa ("arm64: Use common of_kexec_alloc_and_setup_fdt()")
    Link: https://lore.kernel.org/r/20211210010121.101823-1-nramas@xxxxxxxxxxxxxxxxxxx
    Signed-off-by: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/arm64/kernel/machine_kexec_file.c b/arch/arm64/kernel/machine_kexec_file.c
index 63634b4d72c15..59c648d518488 100644
--- a/arch/arm64/kernel/machine_kexec_file.c
+++ b/arch/arm64/kernel/machine_kexec_file.c
@@ -149,6 +149,7 @@ int load_other_segments(struct kimage *image,
 					   initrd_len, cmdline, 0);
 	if (!dtb) {
 		pr_err("Preparing for new dtb failed\n");
+		ret = -EINVAL;
 		goto out_err;
 	}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux