Patch "s390/debug: avoid kernel warning on too large number of pages" has been added to the 5.4-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/debug: avoid kernel warning on too large number of pages

to the 5.4-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-debug-avoid-kernel-warning-on-too-large-number-.patch
and it can be found in the queue-5.4 subdirectory.

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



commit b523ff060667967971a62988e07d61c81420174d
Author: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Date:   Tue Mar 31 05:57:23 2020 -0400

    s390/debug: avoid kernel warning on too large number of pages
    
    [ Upstream commit 827c4913923e0b441ba07ba4cc41e01181102303 ]
    
    When specifying insanely large debug buffers a kernel warning is
    printed. The debug code does handle the error gracefully, though.
    Instead of duplicating the check let us silence the warning to
    avoid crashes when panic_on_warn is used.
    
    Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
    Reviewed-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
    Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 6d321f5f101d6..7184d55d87aae 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -198,9 +198,10 @@ static debug_entry_t ***debug_areas_alloc(int pages_per_area, int nr_areas)
 	if (!areas)
 		goto fail_malloc_areas;
 	for (i = 0; i < nr_areas; i++) {
+		/* GFP_NOWARN to avoid user triggerable WARN, we handle fails */
 		areas[i] = kmalloc_array(pages_per_area,
 					 sizeof(debug_entry_t *),
-					 GFP_KERNEL);
+					 GFP_KERNEL | __GFP_NOWARN);
 		if (!areas[i])
 			goto fail_malloc_areas2;
 		for (j = 0; j < pages_per_area; j++) {



[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