summaryrefslogtreecommitdiff
path: root/mm/memory.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2024-04-22 14:35:22 +1000
committerDave Airlie <airlied@redhat.com>2024-04-22 14:35:52 +1000
commit0208ca55aa9c9b997da1f5bc45c4e98916323f08 (patch)
treee3130b2116f7738ac7cd79ad71698f545bb7db69 /mm/memory.c
parent2871ec40994912ce4f2e2d5072a428eb84c77d3c (diff)
parented30a4a51bb196781c8058073ea720133a65596f (diff)
Backmerge tag 'v6.9-rc5' into drm-nextHEADdrm-next
Linux 6.9-rc5 I've had a persistent msm failure on clang, and the fix is in fixes so just pull it back to fix that. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 904f70b99498..d2155ced45f8 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5973,6 +5973,10 @@ int follow_phys(struct vm_area_struct *vma,
goto out;
pte = ptep_get(ptep);
+ /* Never return PFNs of anon folios in COW mappings. */
+ if (vm_normal_folio(vma, address, pte))
+ goto unlock;
+
if ((flags & FOLL_WRITE) && !pte_write(pte))
goto unlock;