mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 15:53:22 -05:00
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: 59d3daafa1 ("dma-debug: add kernel command line parameters")
Signed-off-by: Randy Dunlap <[email protected]>
Reported-by: Igor Zhbanov <[email protected]>
Link: lore.kernel.org/r/[email protected]
Cc: Joerg Roedel <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: [email protected]
Cc: Robin Murphy <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
fe334765e4
commit
79467b9563
1 changed files with 2 additions and 2 deletions
|
|
@ -980,7 +980,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)
|
||||
|
|
@ -989,7 +989,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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue