Skip to content

Commit 5c31b28

Browse files
Xie XiuQiIngo Molnar
authored andcommitted
x86/mce: Fix monarch timeout setting through the mce= cmdline option
Using "mce=1,10000000" on the kernel cmdline to change the monarch timeout does not work. The cause is that get_option() does parse a subsequent comma in the option string and signals that with a return value. So we don't need to check for a second comma ourselves. Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Link: http://lkml.kernel.org/r/1432120943-25028-1-git-send-email-xiexiuqi@huawei.com Link: http://lkml.kernel.org/r/1432628901-18044-19-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 4ddf2a1 commit 5c31b28

File tree

1 file changed

+1
-4
lines changed
  • arch/x86/kernel/cpu/mcheck

1 file changed

+1
-4
lines changed

arch/x86/kernel/cpu/mcheck/mce.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,11 +2014,8 @@ static int __init mcheck_enable(char *str)
20142014
else if (!strcmp(str, "bios_cmci_threshold"))
20152015
cfg->bios_cmci_threshold = true;
20162016
else if (isdigit(str[0])) {
2017-
get_option(&str, &(cfg->tolerant));
2018-
if (*str == ',') {
2019-
++str;
2017+
if (get_option(&str, &cfg->tolerant) == 2)
20202018
get_option(&str, &(cfg->monarch_timeout));
2021-
}
20222019
} else {
20232020
pr_info("mce argument %s ignored. Please use /sys\n", str);
20242021
return 0;

0 commit comments

Comments
 (0)