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

[xen master] x86/mm: fix wrong unmap call



commit f889fa267c47c3495d304da5da9dd2ef8a4c95af
Author:     Hongyan Xia <hongyxia@xxxxxxxxxx>
AuthorDate: Thu Apr 22 18:42:30 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Apr 22 18:49:23 2021 +0100

    x86/mm: fix wrong unmap call
    
    Commit 'x86/mm: switch to new APIs in modify_xen_mappings' applied the
    hunk of the unmap call to map_pages_to_xen() which was wrong and clearly
    should have been at the end of modify_xen_mappings(). Fix.
    
    Fixes: dd68f2e49bea ("x86/mm: switch to new APIs in modify_xen_mappings")
    Signed-off-by: Hongyan Xia <hongyxia@xxxxxxxxxx>
    Tested-by: Julien Grall <jgrall@xxxxxxxxxx>
    Tested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 50229e38d3..84e3ccf47e 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5532,7 +5532,6 @@ int map_pages_to_xen(
 
  out:
     L3T_UNLOCK(current_l3page);
-    unmap_domain_page(pl2e);
     unmap_domain_page(pl3e);
     unmap_domain_page(pl2e);
     return rc;
@@ -5830,6 +5829,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, 
unsigned int nf)
  out:
     L3T_UNLOCK(current_l3page);
     unmap_domain_page(pl3e);
+    unmap_domain_page(pl2e);
     return rc;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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