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.

fs/proc/task_mmu.c: fix make_uffd_wp_huge_pte() huge pte handling

make_uffd_wp_huge_pte() should return after handling a huge_pte_none()
pte.

Link: https://lkml.kernel.org/r/66178124-ebdf-4e23-b8ca-ed3eb8030c81@lucifer.local
Fixes: 03bfbc3ad6e4 ("mm: remove is_hugetlb_entry_[migration, hwpoisoned]()")
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reported-by: Vlastimil Babka <vbabka@suse.cz>
Closes: https://lkml.kernel.org/r/dc483db3-be4d-45f7-8b40-a28f5d8f5738@suse.cz
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Lorenzo Stoakes and committed by
Andrew Morton
12f0cd39 ce2bba89

+3 -1
+3 -1
fs/proc/task_mmu.c
··· 2500 2500 const unsigned long psize = huge_page_size(hstate_vma(vma)); 2501 2501 softleaf_t entry; 2502 2502 2503 - if (huge_pte_none(ptent)) 2503 + if (huge_pte_none(ptent)) { 2504 2504 set_huge_pte_at(vma->vm_mm, addr, ptep, 2505 2505 make_pte_marker(PTE_MARKER_UFFD_WP), psize); 2506 + return; 2507 + } 2506 2508 2507 2509 entry = softleaf_from_pte(ptent); 2508 2510 if (softleaf_is_hwpoison(entry) || softleaf_is_marker(entry))