x86/mm: fix memory hotplug error cleanup
authorNorbert Manthey <nmanthey@amazon.com>
Fri, 17 Feb 2017 14:51:37 +0000 (15:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Feb 2017 14:51:37 +0000 (15:51 +0100)
commit71af7d4220227529ea43b898683d4d2e68a90ffd
treed1b71ab753307cf8e84f85be998358382b4a7732
parentab914e04a62727b75782e401eaf2e8b72f717f61
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@amazon.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_64/mm.c