summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2025-05-19 11:12:36 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2025-05-19 11:12:36 -0300
commit4d4eb38795b5cbc66103ae2582bccead5bf0f736 (patch)
tree8048284284f48cb7c97a5c4fef0fc712125bbffa /kernel/fork.c
parent8cdf00b843ea3ca0e920176937bbc906b0b5bb04 (diff)
parenta5806cd506af5a7c19bcd596e4708b5c464bfd21 (diff)
downloadlinux-4d4eb38795b5cbc66103ae2582bccead5bf0f736.tar.gz
linux-4d4eb38795b5cbc66103ae2582bccead5bf0f736.zip
Merge remote-tracking branch 'torvalds/master' into perf-tools-next
To pick up changes for other tools/ libraries used by perf and for header synchronization with the kernel sources originals. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index c4b26cd8998b..168681fc4b25 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -498,10 +498,6 @@ struct vm_area_struct *vm_area_dup(struct vm_area_struct *orig)
vma_numab_state_init(new);
dup_anon_vma_name(orig, new);
- /* track_pfn_copy() will later take care of copying internal state. */
- if (unlikely(new->vm_flags & VM_PFNMAP))
- untrack_pfn_clear(new);
-
return new;
}
@@ -672,6 +668,11 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
tmp = vm_area_dup(mpnt);
if (!tmp)
goto fail_nomem;
+
+ /* track_pfn_copy() will later take care of copying internal state. */
+ if (unlikely(tmp->vm_flags & VM_PFNMAP))
+ untrack_pfn_clear(tmp);
+
retval = vma_dup_policy(mpnt, tmp);
if (retval)
goto fail_nomem_policy;