diff mbox

[for-4.8,1/2] libxl: set ret in the check for nestedhvm and altp2m

Message ID 1478191317-2755-2-git-send-email-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu Nov. 3, 2016, 4:41 p.m. UTC
The error path expects ret to be set, otherwise an assertion is
triggered.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>

Please backport to 4.6 and 4.7.
---
 tools/libxl/libxl_create.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ian Jackson Nov. 4, 2016, 2:39 p.m. UTC | #1
Wei Liu writes ("[PATCH for-4.8 1/2] libxl: set ret in the check for nestedhvm and altp2m"):
> The error path expects ret to be set, otherwise an assertion is
> triggered.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>

Ian.
diff mbox

Patch

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index d986cd2..abd2272 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -910,6 +910,7 @@  static void initiate_domain_create(libxl__egc *egc,
     if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
         (libxl_defbool_val(d_config->b_info.u.hvm.nested_hvm) &&
          libxl_defbool_val(d_config->b_info.u.hvm.altp2m))) {
+        ret = ERROR_INVAL;
         LOG(ERROR, "nestedhvm and altp2mhvm cannot be used together");
         goto error_out;
     }