Patch "s390/mem_detect: fix detect_memory() error handling" 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

    s390/mem_detect: fix detect_memory() error handling

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:
     s390-mem_detect-fix-detect_memory-error-handling.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 9be8eb14960641f60356e58b656a94f5e0b8da8b
Author: Vasily Gorbik <gor@xxxxxxxxxxxxx>
Date:   Fri Jan 27 14:03:07 2023 +0100

    s390/mem_detect: fix detect_memory() error handling
    
    [ Upstream commit 3400c35a4090704e6c465449616ab7e67a9209e7 ]
    
    Currently if for some reason sclp_early_read_info() fails,
    sclp_early_get_memsize() will not set max_physmem_end and it
    will stay uninitialized. Any garbage value other than 0 will lead
    to detect_memory() taking wrong path or returning a garbage value
    as max_physmem_end. To avoid that simply initialize max_physmem_end.
    
    Fixes: 73045a08cf55 ("s390: unify identity mapping limits handling")
    Reported-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
    Reviewed-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
    Signed-off-by: Vasily Gorbik <gor@xxxxxxxxxxxxx>
    Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/boot/mem_detect.c b/arch/s390/boot/mem_detect.c
index 2f949cd9076b8..17a32707d17e0 100644
--- a/arch/s390/boot/mem_detect.c
+++ b/arch/s390/boot/mem_detect.c
@@ -165,7 +165,7 @@ static void search_mem_end(void)
 
 unsigned long detect_memory(void)
 {
-	unsigned long max_physmem_end;
+	unsigned long max_physmem_end = 0;
 
 	sclp_early_get_memsize(&max_physmem_end);
 



[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