From: Jan Beulich Date: Tue, 21 May 2024 10:01:33 +0000 (+0200) Subject: x86: respect mapcache_domain_init() failing X-Git-Tag: RELEASE-4.17.5~51 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e31e8ed53ebafb98418c994f727884924bf45f52;p=xen.git x86: respect mapcache_domain_init() failing 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é master commit: 7270fdc7a0028d4b7b26fd1b36c6b9e97abcf3da master date: 2024-05-15 19:59:52 +0100 --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 5dbd1d8a12..a7bf828578 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -833,7 +833,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;