libxc: fix uninitialized variable when changing rtds scheduling parameters
PATCH 1/1 libxc: fix uninitialized variable when changing rtds scheduling parameters
Commit 046c2b503a89d21b41e4d555a9f75d02af00dbc6 introduces a build
failure: in some cases (e.g., num_vcpus <=0), xc_sched_rtds_vcpu_get/set returns an uninitialized variable.
Fix it.
---
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
--- tools/libxc/xc_rt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxc/xc_rt.c +2 -2
@@ -68,7 +68,7 @@ int xc_sched_rtds_vcpu_set(xc_interface *xch,struct xen_domctl_schedparam_vcpu *vcpus, uint32_t num_vcpus) { - int rc; + int rc = 0;unsigned processed =0 ;DECLARE_DOMCTL ; DECLARE_HYPERCALL_BOUNCE(vcpus, sizeof(*vcpus) * num_vcpus,
@@ -102,7 +102,7 @@ int xc_sched_rtds_vcpu_get(xc_interface *xch,struct xen_domctl_schedparam_vcpu *vcpus, uint32_t num_vcpus) { - int rc; + int rc = 0;unsigned processed =0 ;DECLARE_DOMCTL ; DECLARE_HYPERCALL_BOUNCE(vcpus, sizeof(*vcpus) * num_vcpus,
Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 8 lines · Chong Li
Commit
046c2b503a89d21b41e4d555a9f75d02af00dbc6introduces a build
failure: in some cases (e.g.,num_vcpus<=0), xc_sched_rtds_vcpu_get/set returns an uninitialized variable.Fix it.
Signed-off-by Chong Li <[email protected]>
Quoted 8 lines
---
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
LGTM.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Dario Faggioli
Reviewed-byQuoted 18 lines · Andrew Cooper
Quoted 9 lines · Chong Li
Commit
046c2b503a89d21b41e4d555a9f75d02af00dbc6introduces a build
failure: in some cases (e.g.,num_vcpus<=0), xc_sched_rtds_vcpu_get/set returns an uninitialized variable.Fix it.
Signed-off-by Chong Li <[email protected]>Quoted 8 lines
---
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
CC: <[email protected]>
Quoted 4 lines
LGTM.
Reviewed-by Andrew Cooper <[email protected]>
Dario
Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Andrew Cooper writes ("Re: [Xen-devel] [PATCH v1] libxc: fix uninitialized variable when changing rtds scheduling parameters"):
Quoted 8 lines · Chong Li
Quoted 3 lines
Commit
046c2b503a89d21b41e4d555a9f75d02af00dbc6introduces a build
failure: in some cases (e.g.,num_vcpus<=0), xc_sched_rtds_vcpu_get/set returns an uninitialized variable.LGTM.
Reviewed-by Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel