提交 501679e0 编写于 作者: R Randy Dunlap 提交者: Zheng Zengkai

ACPI: APEI: fix return value of __setup handlers

stable inclusion
from stable-v5.10.110
commit 9eeee6f684e0cce69afbf2219fe29a793ac17d24
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9eeee6f684e0cce69afbf2219fe29a793ac17d24

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

[ Upstream commit f3303ff6 ]

__setup() handlers should return 1 to indicate that the boot option
has been handled. Returning 0 causes a boot option to be listed in
the Unknown kernel command line parameters and also added to init's
arg list (if no '=' sign) or environment list (if of the form 'a=b').

Unknown kernel command line parameters "erst_disable
  bert_disable hest_disable BOOT_IMAGE=/boot/bzImage-517rc6", will be
  passed to user space.

 Run /sbin/init as init process
   with arguments:
     /sbin/init
     erst_disable
     bert_disable
     hest_disable
   with environment:
     HOME=/
     TERM=linux
     BOOT_IMAGE=/boot/bzImage-517rc6

Fixes: a3e2acc5 ("ACPI / APEI: Add Boot Error Record Table (BERT) support")
Fixes: a08f82d0 ("ACPI, APEI, Error Record Serialization Table (ERST) support")
Fixes: 9dc96664 ("ACPI, APEI, HEST table parsing")
Signed-off-by: NRandy Dunlap <rdunlap@infradead.org>
Reported-by: NIgor Zhbanov <i.zhbanov@omprussia.ru>
Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru
Reviewed-by: N"Huang, Ying" <ying.huang@intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 73e16d8c
...@@ -77,7 +77,7 @@ static int __init setup_bert_disable(char *str) ...@@ -77,7 +77,7 @@ static int __init setup_bert_disable(char *str)
{ {
bert_disable = 1; bert_disable = 1;
return 0; return 1;
} }
__setup("bert_disable", setup_bert_disable); __setup("bert_disable", setup_bert_disable);
......
...@@ -891,7 +891,7 @@ EXPORT_SYMBOL_GPL(erst_clear); ...@@ -891,7 +891,7 @@ EXPORT_SYMBOL_GPL(erst_clear);
static int __init setup_erst_disable(char *str) static int __init setup_erst_disable(char *str)
{ {
erst_disable = 1; erst_disable = 1;
return 0; return 1;
} }
__setup("erst_disable", setup_erst_disable); __setup("erst_disable", setup_erst_disable);
......
...@@ -219,7 +219,7 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count) ...@@ -219,7 +219,7 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count)
static int __init setup_hest_disable(char *str) static int __init setup_hest_disable(char *str)
{ {
hest_disable = HEST_DISABLED; hest_disable = HEST_DISABLED;
return 0; return 1;
} }
__setup("hest_disable", setup_hest_disable); __setup("hest_disable", setup_hest_disable);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册