kernel: dma-debug: fix return value of __setup handlers
PATCH 1/1 kernel: dma-debug: fix return value of __setup handlers
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=100Return 1 from these __setup handlers to indicate that the command line option has been handled.
--- kernel/dma/debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/dma/debug.c +2 -2
@@ -927,7 +927,7 @@ static __init int dma_debug_cmdline(char 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_cmdlreturn -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);
Thanks,
applied to the dma-mapping tree.
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu