aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/cpupool.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2011-02-09 08:44:38 +0000
committerKeir Fraser <keir@xen.org>2011-02-09 08:44:38 +0000
commit657c5ca69673e5100ef6143c1a5294e506ff35c1 (patch)
tree0b51615822031a4c578096f1969faece4b47bf5a /xen/common/cpupool.c
parentf4b185362da47e1d9189ed3eb73cd8eca80c364e (diff)
downloadxen-657c5ca69673e5100ef6143c1a5294e506ff35c1.tar.gz
xen-657c5ca69673e5100ef6143c1a5294e506ff35c1.tar.bz2
xen-657c5ca69673e5100ef6143c1a5294e506ff35c1.zip
cpupool: Strict parameter checking for cpupool operations
Some cpupool actions didn't check the cpupool_id exactly. For some actions this doesn't make any sense, so refuse those actions if the specified cpupool doesn't exist. Signed-off-by: Juergen Gross <juergen.gross@ts.fujitsu.com>
Diffstat (limited to 'xen/common/cpupool.c')
-rw-r--r--xen/common/cpupool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index b90e5c0371..16a1f43d29 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -485,7 +485,7 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
ret = -EBUSY;
if ( !cpu_isset(cpu, cpupool_free_cpus) )
goto addcpu_out;
- c = cpupool_find_by_id(op->cpupool_id, 0);
+ c = cpupool_find_by_id(op->cpupool_id, 1);
ret = -ENOENT;
if ( c == NULL )
goto addcpu_out;
@@ -501,7 +501,7 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
{
unsigned cpu;
- c = __cpupool_get_by_id(op->cpupool_id, 0);
+ c = __cpupool_get_by_id(op->cpupool_id, 1);
ret = -ENOENT;
if ( c == NULL )
break;