Strict parameter checking for cpupool operations
PATCH 1/1 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.
1 file changed, 2 insertions(+), 2 deletions(-)
xen/common/cpupool.c | 4 ++--
# HG changeset patch
# User Juergen Gross <[email protected]> # Date 1297148261 -3600
# Node ID e5e8d2c42e759a8eabddcca0fab548a9fc9f6b8a # Parent 9e463cb156586bfd50b8123664f1c290ca9f1f98 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.
xen/common/cpupool.c +2 -2
@@ -485,7 +485,7 @@ int cpupool_do_sysctl(struct xen_sysctl_ 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_ {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 ;
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel