Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'x86-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fix from Thomas Gleixner:
"A single fix for the handling of unpopulated sub-pmd spaces.

The copy & pasta from the corresponding s390 code screwed up the
address calculation for marking the sub-pmd ranges via memset by
omitting the ALIGN_DOWN() to calculate the proper start address.

It's a mystery why this code is not generic and shared because there
is nothing architecture specific in there, but that's too intrusive
for a backportable fix"

* tag 'x86-urgent-2022-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mm: Fix marking of unused sub-pmd ranges

+3 -2
+3 -2
arch/x86/mm/init_64.c
··· 902 902 903 903 static void __meminit vmemmap_use_new_sub_pmd(unsigned long start, unsigned long end) 904 904 { 905 + const unsigned long page = ALIGN_DOWN(start, PMD_SIZE); 906 + 905 907 vmemmap_flush_unused_pmd(); 906 908 907 909 /* ··· 916 914 * Mark with PAGE_UNUSED the unused parts of the new memmap range 917 915 */ 918 916 if (!IS_ALIGNED(start, PMD_SIZE)) 919 - memset((void *)start, PAGE_UNUSED, 920 - start - ALIGN_DOWN(start, PMD_SIZE)); 917 + memset((void *)page, PAGE_UNUSED, start - page); 921 918 922 919 /* 923 920 * We want to avoid memset(PAGE_UNUSED) when populating the vmemmap of