Message ID | dc80cf26-8900-4848-84dd-6f3e47d59f57@suse.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | x86: respect mapcache_domain_init() failing | expand |
On Wed, May 15, 2024 at 03:35:15PM +0200, Jan Beulich wrote: > 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 <jbeulich@suse.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Thanks, Roger.
--- 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;
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 <jbeulich@suse.com> --- Effectively split off of "x86/mapcache: Initialise the mapcache for the idle domain", except that the change to respect the error wasn't even mentioned there. Plus we likely want to backport this.