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

[Xen-changelog] [xen staging] libxl: modify libxl__logv() to only log valid domid values



commit c733b9e25c705d9680531055d7136570cf90dd2e
Author:     Paul Durrant <pdurrant@xxxxxxxxxx>
AuthorDate: Fri Feb 21 11:20:45 2020 +0000
Commit:     Wei Liu <wl@xxxxxxx>
CommitDate: Fri Feb 21 12:05:41 2020 +0000

    libxl: modify libxl__logv() to only log valid domid values
    
    Some code-paths use values other than INVALID_DOMID to indicate an invalid
    domain id. Specifically, xl will pass a value of 0 when creating/restoring
    a domain. Therefore modify libxl__logv() to use libxl_domid_valid_guest()
    as a validity test.
    
    Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    Acked-by: Wei Liu <wl@xxxxxxx>
---
 tools/libxl/libxl_internal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_internal.c b/tools/libxl/libxl_internal.c
index 211236dc99..a7da2921de 100644
--- a/tools/libxl/libxl_internal.c
+++ b/tools/libxl/libxl_internal.c
@@ -234,7 +234,7 @@ void libxl__logv(libxl_ctx *ctx, xentoollog_level msglevel, 
int errnoval,
     fileline[sizeof(fileline)-1] = 0;
 
     domain[0] = 0;
-    if (domid != INVALID_DOMID)
+    if (libxl_domid_valid_guest(domid))
         snprintf(domain, sizeof(domain), "Domain %"PRIu32":", domid);
  x:
     xtl_log(ctx->lg, msglevel, errnoval, "libxl",
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.