]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
xen: Add missing va_end() in hypercall_create_continuation()
authorJulien Grall <julien@xen.org>
Mon, 25 Nov 2019 15:24:02 +0000 (16:24 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Nov 2019 15:24:02 +0000 (16:24 +0100)
The documentation requires va_start() to always be matched with a
corresponding va_end(). However, this is not the case in the path used
for bad format.

This was introduced by XSA-296.

Coverity-ID: 1488727
Fixes: 0bf9f8d3e3 ("xen/hypercall: Don't use BUG() for parameter checking in hypercall_create_continuation()")
Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Andrew Cooper <andrew.cooper3@citrix.com>
master commit: df7a19338a892b5cf585fd2bee8584cb15e0cace
master date: 2019-11-21 15:50:01 +0000

xen/arch/arm/domain.c
xen/arch/x86/hypercall.c

index 1a05e5d53bafdd271864cca62749fbac877a778b..138eea9d63457ee2830f2eda768f8c87c084fd30 100644 (file)
@@ -472,6 +472,7 @@ unsigned long hypercall_create_continuation(
     return rc;
 
  bad_fmt:
+    va_end(args);
     gprintk(XENLOG_ERR, "Bad hypercall continuation format '%c'\n", *p);
     ASSERT_UNREACHABLE();
     domain_crash(current->domain);
index 01c030e617e9d0b87c99db4b4e2290b43de677cd..6536455cd70346783b4d4b43720325509431d269 100644 (file)
@@ -151,6 +151,7 @@ unsigned long hypercall_create_continuation(
     return op;
 
  bad_fmt:
+    va_end(args);
     gprintk(XENLOG_ERR, "Bad hypercall continuation format '%c'\n", *p);
     ASSERT_UNREACHABLE();
     domain_crash(curr->domain);