All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] libxl: check return value of libxl_vcpu_setaffinity
@ 2015-04-08 16:05 Wei Liu
  2015-04-09 14:16 ` Dario Faggioli
  2015-04-15 13:17 ` Ian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Wei Liu @ 2015-04-08 16:05 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian Jackson, andrew.cooper3, Dario Faggioli, Wei Liu, Ian Campbell

That function can fail.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Dario Faggioli <dario.faggioli@citrix.com>
---
v2: add missing `}'.
---
 tools/libxl/libxl_dom.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
index a88db69..8021ca6 100644
--- a/tools/libxl/libxl_dom.c
+++ b/tools/libxl/libxl_dom.c
@@ -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:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-15 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-08 16:05 [PATCH v2] libxl: check return value of libxl_vcpu_setaffinity Wei Liu
2015-04-09 14:16 ` Dario Faggioli
2015-04-15 13:17 ` Ian Jackson
2015-04-15 16:05   ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.