]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
ia64, xencomm: fix XEN_SYSCTL_cpupool_op
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 13 Sep 2010 16:38:36 +0000 (17:38 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 13 Sep 2010 16:38:36 +0000 (17:38 +0100)
Because the cpumap member of struct xen_sysctl_cpupool_op is used only
when the operation is XEN_SYSCTL_CPUPOOL_OP_INFO or
XEN_SYSCTL_CPUPOOL_OP_FREEINFO, in case of others, xencomm_map to
cpumap fails, thus XEN_SYSCTL_cpupool_op fails.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
arch/ia64/xen/xcom_privcmd.c

index 03f6630481344b4cc399c06ecb03b7fb46c53bd3..8aa788e70a04cbf74e7ab4a4ac9a79f04b30cabd 100644 (file)
@@ -283,6 +283,9 @@ xencomm_privcmd_sysctl(privcmd_hypercall_t *hypercall)
        }
 
        case XEN_SYSCTL_cpupool_op:
+               if (kern_op.u.cpupool_op.op != XEN_SYSCTL_CPUPOOL_OP_INFO &&
+                   kern_op.u.cpupool_op.op != XEN_SYSCTL_CPUPOOL_OP_FREEINFO)
+                       break;
                desc = xencomm_map(
                        xen_guest_handle(kern_op.u.cpupool_op.cpumap.bitmap),
                        ROUND_DIV(kern_op.u.cpupool_op.cpumap.nr_cpus, 8));