diff options
-rw-r--r-- | kernel/torture.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/torture.c b/kernel/torture.c index 8faa1a9aaeb9..17b2be9bde12 100644 --- a/kernel/torture.c +++ b/kernel/torture.c | |||
@@ -88,6 +88,8 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes, | |||
88 | 88 | ||
89 | if (!cpu_online(cpu) || !cpu_is_hotpluggable(cpu)) | 89 | if (!cpu_online(cpu) || !cpu_is_hotpluggable(cpu)) |
90 | return false; | 90 | return false; |
91 | if (num_online_cpus() <= 1) | ||
92 | return false; /* Can't offline the last CPU. */ | ||
91 | 93 | ||
92 | if (verbose > 1) | 94 | if (verbose > 1) |
93 | pr_alert("%s" TORTURE_FLAG | 95 | pr_alert("%s" TORTURE_FLAG |