[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] cpupool: Strict parameter checking for cpupool operations



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1297241078 0
# Node ID fc986c1314bc8d061aa9f0bebc0eb40624089d4b
# Parent  c23b711f92646a7e441ee80dbb15b9e1e87c83f8
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@xxxxxxxxxxxxxx>
---
 xen/common/cpupool.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r c23b711f9264 -r fc986c1314bc xen/common/cpupool.c
--- a/xen/common/cpupool.c      Wed Feb 09 08:40:05 2011 +0000
+++ b/xen/common/cpupool.c      Wed Feb 09 08:44:38 2011 +0000
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.