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

[Xen-changelog] [xen stable-4.3] libxl: Don't ignore error when we fail to give access to ioport/irq/iomem



commit 027f0256806e6d10ddb26ef65ac67e58522e6ff4
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Wed Jan 14 13:06:48 2015 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jan 19 17:47:30 2015 +0000

    libxl: Don't ignore error when we fail to give access to ioport/irq/iomem
    
    If we fail to give the access, the domain will unlikely work correctly.
    So we should bail out at the first error.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
    Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
    
    (Based on commit 7070eec417934360bf3aed434191246dfe4f8091)
    (cherry picked from commit 17664f0ba031344846090a482ad42d225aa911c7)
---
 tools/libxl/libxl_create.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index d1e2ebc..aaab584 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -970,6 +970,7 @@ static void domcreate_launch_dm(libxl__egc *egc, 
libxl__multidev *multidev,
                  "failed give dom%d access to ioports %"PRIx32"-%"PRIx32,
                  domid, io->first, io->first + io->number - 1);
             ret = ERROR_FAIL;
+            goto error_out;
         }
     }
 
@@ -985,6 +986,7 @@ static void domcreate_launch_dm(libxl__egc *egc, 
libxl__multidev *multidev,
         if (ret < 0) {
             LOGE(ERROR, "failed give dom%d access to irq %d", domid, irq);
             ret = ERROR_FAIL;
+            goto error_out;
         }
     }
 
@@ -1001,6 +1003,7 @@ static void domcreate_launch_dm(libxl__egc *egc, 
libxl__multidev *multidev,
                  "failed give dom%d access to iomem range %"PRIx64"-%"PRIx64,
                  domid, io->start, io->start + io->number - 1);
             ret = ERROR_FAIL;
+            goto error_out;
         }
     }
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.3

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.