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

[Xen-changelog] [xen master] x86/mm: fix memory hotplug error cleanup



commit 71af7d4220227529ea43b898683d4d2e68a90ffd
Author:     Norbert Manthey <nmanthey@xxxxxxxxxx>
AuthorDate: Fri Feb 17 15:51:37 2017 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Feb 17 15:51:37 2017 +0100

    x86/mm: fix memory hotplug error cleanup
    
    During destroying the m2p mapping, the loop variable was always incremented
    by one, as the current version used a compare operator on the left hand 
side,
    which always evaluated to true, i.e.
    
    i += 1UL < (L2_PAGETABLE_SHIFT - 2)
    
    The fix increments the value of the variable by the actual page size by
    using the shift operator instead.
    
    Signed-off-by: Norbert Manthey <nmanthey@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/x86_64/mm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/x86_64/mm.c b/xen/arch/x86/x86_64/mm.c
index 9ead02e..52f2bd5 100644
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -251,7 +251,7 @@ static void destroy_compat_m2p_mapping(struct 
mem_hotadd_info *info)
             }
         }
 
-        i += 1UL < (L2_PAGETABLE_SHIFT - 2);
+        i += 1UL << (L2_PAGETABLE_SHIFT - 2);
     }
 
     return;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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