Skip to content

Commit f3303ff

Browse files
rddunlaprafaeljw
authored andcommitted
ACPI: APEI: fix return value of __setup handlers
__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: a3e2acc ("ACPI / APEI: Add Boot Error Record Table (BERT) support") Fixes: a08f82d ("ACPI, APEI, Error Record Serialization Table (ERST) support") Fixes: 9dc9666 ("ACPI, APEI, HEST table parsing") Signed-off-by: Randy Dunlap <[email protected]> Reported-by: Igor Zhbanov <[email protected]> Link: lore.kernel.org/r/[email protected] Reviewed-by: "Huang, Ying" <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 27e932a commit f3303ff

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/acpi/apei/bert.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int __init setup_bert_disable(char *str)
7777
{
7878
bert_disable = 1;
7979

80-
return 0;
80+
return 1;
8181
}
8282
__setup("bert_disable", setup_bert_disable);
8383

drivers/acpi/apei/erst.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ EXPORT_SYMBOL_GPL(erst_clear);
891891
static int __init setup_erst_disable(char *str)
892892
{
893893
erst_disable = 1;
894-
return 0;
894+
return 1;
895895
}
896896

897897
__setup("erst_disable", setup_erst_disable);

drivers/acpi/apei/hest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count)
224224
static int __init setup_hest_disable(char *str)
225225
{
226226
hest_disable = HEST_DISABLED;
227-
return 0;
227+
return 1;
228228
}
229229

230230
__setup("hest_disable", setup_hest_disable);

0 commit comments

Comments
 (0)