From: Julien Grall Date: Wed, 20 Nov 2019 13:37:51 +0000 (+0000) Subject: xen: Add missing va_end() in hypercall_create_continuation() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=df7a19338a892b5cf585fd2bee8584cb15e0cace;p=people%2Fsstabellini%2Fxen-unstable.git%2F.git xen: Add missing va_end() in hypercall_create_continuation() 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 Reviewed-by: Jan Beulich Reviewed-by: Andrew Andrew Cooper Release-acked-by: Juergen Gross --- diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 9e8e9d921d..c0a13aa0ab 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -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); diff --git a/xen/arch/x86/hypercall.c b/xen/arch/x86/hypercall.c index 4643e5eb43..1d42702c6a 100644 --- a/xen/arch/x86/hypercall.c +++ b/xen/arch/x86/hypercall.c @@ -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);