diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-10 08:51:09 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-10 08:51:09 +0200 |
| commit | 039535ecf18e8dc93fe4b294fdf175a31bd023b2 (patch) | |
| tree | 4a70d5db5ba3f1c0fdb1e7dc29f16fa7ace044c4 /kernel/fork.c | |
| parent | b2ea273a477cd6e83daedbfa1981cd1a7468f73a (diff) | |
| parent | 09a9639e56c01c7a00d6c0ca63f4c7c41abe075d (diff) | |
Merge 6.3-rc6 into tty-next
We need the tty/serial fixes in here for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index d8cda4c6de6c..0c92f224c68c 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -617,6 +617,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, if (retval) goto out; + mt_clear_in_rcu(vmi.mas.tree); for_each_vma(old_vmi, mpnt) { struct file *file; @@ -700,6 +701,8 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, retval = arch_dup_mmap(oldmm, mm); loop_out: vma_iter_free(&vmi); + if (!retval) + mt_set_in_rcu(vmi.mas.tree); out: mmap_write_unlock(mm); flush_tlb_mm(oldmm); @@ -755,11 +758,6 @@ static void check_mm(struct mm_struct *mm) for (i = 0; i < NR_MM_COUNTERS; i++) { long x = percpu_counter_sum(&mm->rss_stat[i]); - if (likely(!x)) - continue; - - /* Making sure this is not due to race with CPU offlining. */ - x = percpu_counter_sum_all(&mm->rss_stat[i]); if (unlikely(x)) pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%ld\n", mm, resident_page_types[i], x); |
