[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.18] x86: respect mapcache_domain_init() failing



commit dfabab2cd9461ef9d21a708461f35d2ae4b55220
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue May 21 10:25:08 2024 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 21 10:25:08 2024 +0200

    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 <jbeulich@xxxxxxxx>
    Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    master commit: 7270fdc7a0028d4b7b26fd1b36c6b9e97abcf3da
    master date: 2024-05-15 19:59:52 +0100
---
 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 307446273a..5feb0d0679 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -850,7 +850,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;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.18



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.