Skip to content

Commit 88e0a74

Browse files
Aaron Lutorvalds
authored andcommitted
x86/mm: Use proper mask when setting PUD mapping
Commit c164fbb("x86/mm: thread pgprot_t through init_memory_mapping()") mistakenly used __pgprot() which doesn't respect __default_kernel_pte_mask when setting PUD mapping. Fix it by only setting the one bit we actually need (PSE) and leaving the other bits (that have been properly masked) alone. Fixes: c164fbb ("x86/mm: thread pgprot_t through init_memory_mapping()") Signed-off-by: Aaron Lu <[email protected]> Cc: [email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 4c2d0b0 commit 88e0a74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/mm/init_64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ phys_pud_init(pud_t *pud_page, unsigned long paddr, unsigned long paddr_end,
645645
pages++;
646646
spin_lock(&init_mm.page_table_lock);
647647

648-
prot = __pgprot(pgprot_val(prot) | __PAGE_KERNEL_LARGE);
648+
prot = __pgprot(pgprot_val(prot) | _PAGE_PSE);
649649

650650
set_pte_init((pte_t *)pud,
651651
pfn_pte((paddr & PUD_MASK) >> PAGE_SHIFT,

0 commit comments

Comments
 (0)