summaryrefslogtreecommitdiff
path: root/drivers/xen/cpu_hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/cpu_hotplug.c')
-rw-r--r--drivers/xen/cpu_hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c
index f4e59c445964..17054d695411 100644
--- a/drivers/xen/cpu_hotplug.c
+++ b/drivers/xen/cpu_hotplug.c
@@ -53,7 +53,7 @@ static int vcpu_online(unsigned int cpu)
}
static void vcpu_hotplug(unsigned int cpu)
{
- if (!cpu_possible(cpu))
+ if (cpu >= nr_cpu_ids || !cpu_possible(cpu))
return;
switch (vcpu_online(cpu)) {