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/[email protected] Fixes: 2c1f057 ("fs/proc/task_mmu: properly detect PM_MMAP_EXCLUSIVE per page of PMD-mapped THPs") Signed-off-by: David Hildenbrand <[email protected]> Cc: Oscar Salvador <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1f49aaf commit 9b07157

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)