aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/kexec.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-19 18:38:19 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-19 18:38:19 +0100
commitcb11cb5896122f5ba0ab85886aae99ccca9d641a (patch)
tree1d1115028083aee9fdd2925654a30fa4f6d1601b /xen/common/kexec.c
parente787db11670a76582178ac0708b677fc4db2dc63 (diff)
downloadxen-cb11cb5896122f5ba0ab85886aae99ccca9d641a.tar.gz
xen-cb11cb5896122f5ba0ab85886aae99ccca9d641a.tar.bz2
xen-cb11cb5896122f5ba0ab85886aae99ccca9d641a.zip
kexec: Fix dodgy use of cpu_present_map protecting percpu data access.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/kexec.c')
-rw-r--r--xen/common/kexec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/kexec.c b/xen/common/kexec.c
index e4dc1f0390..263faebcf5 100644
--- a/xen/common/kexec.c
+++ b/xen/common/kexec.c
@@ -271,7 +271,7 @@ static int kexec_get_cpu(xen_kexec_range_t *range)
int nr = range->nr;
int nr_bytes = 0;
- if ( nr < 0 || nr >= num_present_cpus() )
+ if ( nr < 0 || nr >= NR_CPUS || !cpu_online(nr) )
return -EINVAL;
nr_bytes += sizeof_note("CORE", sizeof(ELF_Prstatus));