Patch "dma-debug: fix return value of __setup handlers" 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

    dma-debug: fix return value of __setup handlers

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:
     dma-debug-fix-return-value-of-__setup-handlers.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 13d781ab2ac883fa4ab12984500c10eb6a75b5c6
Author: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Date:   Mon Feb 28 14:04:53 2022 -0800

    dma-debug: fix return value of __setup handlers
    
    [ Upstream commit 80e4390981618e290616dbd06ea190d4576f219d ]
    
    When valid kernel command line parameters
      dma_debug=off dma_debug_entries=100
    are used, they are reported as Unknown parameters and added to init's
    environment strings, polluting it.
    
      Unknown kernel command line parameters "BOOT_IMAGE=/boot/bzImage-517rc5
        dma_debug=off dma_debug_entries=100", will be passed to user space.
    
    and
    
     Run /sbin/init as init process
       with arguments:
         /sbin/init
       with environment:
         HOME=/
         TERM=linux
         BOOT_IMAGE=/boot/bzImage-517rc5
         dma_debug=off
         dma_debug_entries=100
    
    Return 1 from these __setup handlers to indicate that the command line
    option has been handled.
    
    Fixes: 59d3daafa1726 ("dma-debug: add kernel command line parameters")
    Signed-off-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
    Reported-by: Igor Zhbanov <i.zhbanov@xxxxxxxxxxxx>
    Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@xxxxxxxxxxxx
    Cc: Joerg Roedel <joro@xxxxxxxxxx>
    Cc: Christoph Hellwig <hch@xxxxxx>
    Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
    Cc: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
    Cc: Robin Murphy <robin.murphy@xxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c
index 7a14ca29c377..f8ff598596b8 100644
--- a/kernel/dma/debug.c
+++ b/kernel/dma/debug.c
@@ -927,7 +927,7 @@ static __init int dma_debug_cmdline(char *str)
 		global_disable = true;
 	}
 
-	return 0;
+	return 1;
 }
 
 static __init int dma_debug_entries_cmdline(char *str)
@@ -936,7 +936,7 @@ static __init int dma_debug_entries_cmdline(char *str)
 		return -EINVAL;
 	if (!get_option(&str, &nr_prealloc_entries))
 		nr_prealloc_entries = PREALLOC_DMA_DEBUG_ENTRIES;
-	return 0;
+	return 1;
 }
 
 __setup("dma_debug=", dma_debug_cmdline);



[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