Skip to content

Commit 9b07157

Browse files
davidhildenbrandgregkh
authored andcommitted
fs/proc/task_mmu: fix pagemap flags with PMD THP entries on 32bit
commit 3754137 upstream. Entries (including flags) are u64, even on 32bit. So right now we are cutting of the flags on 32bit. This way, for example the cow selftest complains about: # ./cow ... Bail Out! read and ioctl return unmatched results for populated: 0 1 Link: https://lkml.kernel.org/r/20241217195000.1734039-1-david@redhat.com Fixes: 2c1f057 ("fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of PMD-mapped THPs") Signed-off-by: David Hildenbrand <david@redhat.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 1f49aaf commit 9b07157

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/proc/task_mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end,
15161516
flags |= PM_FILE;
15171517

15181518
for (; addr != end; addr += PAGE_SIZE, idx++) {
1519-
unsigned long cur_flags = flags;
1519+
u64 cur_flags = flags;
15201520
pagemap_entry_t pme;
15211521

15221522
if (page && (flags & PM_PRESENT) &&

0 commit comments

Comments
 (0)