Skip to content

Commit 1cf3874

Browse files
jgross1David Vrabel
authored andcommitted
x86/xen: fix upper bound of pmd loop in xen_cleanhighmap()
xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper bound of the loop setting non-kernel-image entries to zero should not exceed the size of level2_kernel_pgt. Reported-by: Linus Torvalds <[email protected]> Signed-off-by: Juergen Gross <[email protected]> Signed-off-by: David Vrabel <[email protected]>
1 parent 842775f commit 1cf3874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/xen/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ static void __init xen_cleanhighmap(unsigned long vaddr,
11131113

11141114
/* NOTE: The loop is more greedy than the cleanup_highmap variant.
11151115
* We include the PMD passed in on _both_ boundaries. */
1116-
for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PAGE_SIZE));
1116+
for (; vaddr <= vaddr_end && (pmd < (level2_kernel_pgt + PTRS_PER_PMD));
11171117
pmd++, vaddr += PMD_SIZE) {
11181118
if (pmd_none(*pmd))
11191119
continue;

0 commit comments

Comments
 (0)