]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen: Add missing va_end() in hypercall_create_continuation()
authorJulien Grall <julien@xen.org>
Wed, 20 Nov 2019 13:37:51 +0000 (13:37 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 21 Nov 2019 15:50:01 +0000 (15:50 +0000)
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>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/arch/arm/domain.c
xen/arch/x86/hypercall.c

index 9e8e9d921d2a0e41889b45ab71ba460d8c32d0dd..c0a13aa0ab9d073a5c41acdb0b55e42bff3ed0f8 100644 (file)
@@ -467,6 +467,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 4643e5eb430a96f477bdeabd81e600ec194102b1..1d42702c6a686825f0a6189da907d878b2bf2c7f 100644 (file)
@@ -157,6 +157,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);