diff options
author | David Hildenbrand <david@redhat.com> | 2024-12-17 20:50:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-09 13:32:08 +0100 |
commit | 9b071576f891ee5be970df75499d9d5892815f8a (patch) | |
tree | 0721a00e2beaa5e85e76dbf20d6a4605f688f19d | |
parent | 1f49aaf55652580ae63ab83d67211fe6a55d83dc (diff) | |
download | linux-9b071576f891ee5be970df75499d9d5892815f8a.tar.gz linux-9b071576f891ee5be970df75499d9d5892815f8a.tar.bz2 linux-9b071576f891ee5be970df75499d9d5892815f8a.zip |
fs/proc/task_mmu: fix pagemap flags with PMD THP entries on 32bit
commit 3754137d263f52f4b507cf9ae913f8f0497d1b0e 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: 2c1f057e5be6 ("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>
-rw-r--r-- | fs/proc/task_mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 59571737e167..b8640f36ebf8 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1516,7 +1516,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, flags |= PM_FILE; for (; addr != end; addr += PAGE_SIZE, idx++) { - unsigned long cur_flags = flags; + u64 cur_flags = flags; pagemap_entry_t pme; if (page && (flags & PM_PRESENT) && |