From 7270fdc7a0028d4b7b26fd1b36c6b9e97abcf3da Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 15 May 2024 15:35:15 +0200 Subject: [PATCH] x86: respect mapcache_domain_init() failing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The function itself properly handles and hands onwards failure from create_perdomain_mapping(). Therefore its caller should respect possible failure, too. Fixes: 4b28bf6ae90b ("x86: re-introduce map_domain_page() et al") Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné --- xen/arch/x86/domain.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 20e83cf38b..00a3aaa576 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -858,7 +858,8 @@ int arch_domain_create(struct domain *d, } else if ( is_pv_domain(d) ) { - mapcache_domain_init(d); + if ( (rc = mapcache_domain_init(d)) != 0 ) + goto fail; if ( (rc = pv_domain_initialise(d)) != 0 ) goto fail; -- 2.39.5