]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
x86: respect mapcache_domain_init() failing
authorJan Beulich <jbeulich@suse.com>
Wed, 15 May 2024 13:35:15 +0000 (15:35 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 15 May 2024 18:59:52 +0000 (19:59 +0100)
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>
xen/arch/x86/domain.c

index 20e83cf38bbd00914bf798def9f28217873556a6..00a3aaa5768ad1789c3224874234396e7645e48c 100644 (file)
@@ -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;