Commit d484e833 authored by Randy Dunlap's avatar Randy Dunlap Committed by Yongqiang Liu
Browse files

init/main.c: return 1 from handled __setup() functions

stable inclusion
from stable-4.19.238
commit c7daf1b4ad809692d5c26f33c02ed8a031066548
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5X41F
CVE: NA

--------------------------------

[ Upstream commit f9a40b08 ]

initcall_blacklist() should return 1 to indicate that it handled its
cmdline arguments.

set_debug_rodata() should return 1 to indicate that it handled its
cmdline arguments.  Print a warning if the option string is invalid.

This prevents these strings from being added to the 'init' program's
environment as they are not init arguments/parameters.

Link: https://lkml.kernel.org/r/20220221050901.23985-1-rdunlap@infradead.org


Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Reported-by: default avatarIgor Zhbanov <i.zhbanov@omprussia.ru>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLin Yujun <linyujun809@huawei.com>
Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent 47477ca7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment