libxl: check return value of libxl_vcpu_setaffinity
PATCH v2 1/1 libxl: check return value of libxl_vcpu_setaffinity
That function can fail.
Signed-off-by Wei Liu <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Dario Faggioli <[email protected]>
---
v2: add missing `}'.
--- tools/libxl/libxl_dom.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
tools/libxl/libxl_dom.c +7 -2
@@ -468,8 +468,13 @@ static int set_vnuma_affinity(libxl__gc *gc, uint32_t domid, goto out; } -libxl_for_each_set_bit (j, v->vcpus) -libxl_set_vcpuaffinity (CTX , domid, j,NULL , &cpumap); +libxl_for_each_set_bit (j, v->vcpus) { + rc =libxl_set_vcpuaffinity (CTX , domid, j,NULL , &cpumap); +if (rc) { +LOG (ERROR ,"Can't set cpu affinity for %d" , j); + goto out; + } + } } out:
Signature · 1 line
1.9.1
Quoted 7 lines · Wei Liu
That function can fail.
Signed-off-by Wei Liu <[email protected]>Cc Ian Campbell <[email protected]>Cc Ian Jackson <[email protected]>Cc Dario Faggioli <[email protected]>
Reviewed-by Dario Faggioli <[email protected]>
Regards,
Dario
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Wei Liu writes ("[PATCH v2] libxl: check return value of libxl_vcpu_setaffinity"):
Quoted 1 line
That function can fail.
Acked-by Ian Jackson <[email protected]>
Quoted 4 lines · Ian Jackson
Wei Liu writes ("[PATCH v2] libxl: check return value of
libxl_vcpu_setaffinity"):Quoted 1 line
That function can fail.
Acked-by Ian Jackson <[email protected]>
Likewise + applied.