diff options
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r-- | kernel/cpu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 077fde6fb953..ef1c565edc5d 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -1964,6 +1964,9 @@ static ssize_t write_cpuhp_fail(struct device *dev, | |||
1964 | if (ret) | 1964 | if (ret) |
1965 | return ret; | 1965 | return ret; |
1966 | 1966 | ||
1967 | if (fail < CPUHP_OFFLINE || fail > CPUHP_ONLINE) | ||
1968 | return -EINVAL; | ||
1969 | |||
1967 | /* | 1970 | /* |
1968 | * Cannot fail STARTING/DYING callbacks. | 1971 | * Cannot fail STARTING/DYING callbacks. |
1969 | */ | 1972 | */ |
@@ -2339,6 +2342,9 @@ static int __init mitigations_parse_cmdline(char *arg) | |||
2339 | cpu_mitigations = CPU_MITIGATIONS_AUTO; | 2342 | cpu_mitigations = CPU_MITIGATIONS_AUTO; |
2340 | else if (!strcmp(arg, "auto,nosmt")) | 2343 | else if (!strcmp(arg, "auto,nosmt")) |
2341 | cpu_mitigations = CPU_MITIGATIONS_AUTO_NOSMT; | 2344 | cpu_mitigations = CPU_MITIGATIONS_AUTO_NOSMT; |
2345 | else | ||
2346 | pr_crit("Unsupported mitigations=%s, system may still be vulnerable\n", | ||
2347 | arg); | ||
2342 | 2348 | ||
2343 | return 0; | 2349 | return 0; |
2344 | } | 2350 | } |