From patchwork Wed Jan 25 23:35:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13116407 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25D10C61D97 for ; Wed, 25 Jan 2023 23:36:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B0EAE6B0080; Wed, 25 Jan 2023 18:36:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ABF546B0081; Wed, 25 Jan 2023 18:36:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 910D66B0082; Wed, 25 Jan 2023 18:36:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 7D4006B0080 for ; Wed, 25 Jan 2023 18:36:14 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 45D61AB537 for ; Wed, 25 Jan 2023 23:36:14 +0000 (UTC) X-FDA: 80394932268.13.2735189 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf11.hostedemail.com (Postfix) with ESMTP id 780714000B for ; Wed, 25 Jan 2023 23:36:12 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=J8+WJJhO; spf=pass (imf11.hostedemail.com: domain of 367zRYwYKCNAEGD09x2AA270.yA8749GJ-886Hwy6.AD2@flex--surenb.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=367zRYwYKCNAEGD09x2AA270.yA8749GJ-886Hwy6.AD2@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1674689772; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=12V9eNw/BHvKrDUbcOiIzhGySNxYs9W6d56STu3zUWU=; b=ucShrSHqY8GEl2UFy9kG7E54ufitsc8r+ro+d0A4pDbQrGRcOoPueaPip3hj22i8w/aYog EzV5nlZMyAKQNHggIwyydqpwfAK+N/1ScT6X/HT3nl8w13qM9pFC5P1r1TU+3fLx7e72jq ros/X47eYNrpZiENvUY5GWxr6WBE+xk= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=J8+WJJhO; spf=pass (imf11.hostedemail.com: domain of 367zRYwYKCNAEGD09x2AA270.yA8749GJ-886Hwy6.AD2@flex--surenb.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=367zRYwYKCNAEGD09x2AA270.yA8749GJ-886Hwy6.AD2@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674689772; a=rsa-sha256; cv=none; b=hH6cCc9csGUWwmRmlEn2N05VLN4qyL8h6ESCcB75FpQ0kt0HjDjvnsgKVx4D9zXj99PaY/ ZyqkPqgG4qp+OR2R9JfBM7+tSJlbh/WNHGiv3SLG3oVhrAK4G1WjgLD5uNPg/V1PomQfiW +kpzDHtfBmb/ayju/2M4kWuUftBJVD0= Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-4c11ae6ab25so1492547b3.8 for ; Wed, 25 Jan 2023 15:36:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=12V9eNw/BHvKrDUbcOiIzhGySNxYs9W6d56STu3zUWU=; b=J8+WJJhOgp9FSHU3QNyFk4zjsgoJfZ8t9lKSuapLLPQ9Tw0UDBL5Gs70N1xS2YmiQZ v8pDCjLGFlYjJtjY8rrGHCSWuauCwnjnBSYThnx17muXt82864mhazCfqe3RFgt5Fus+ c8K3+7SL5ZyS3WdGdtN41DyI98OB3Fv7kopTlvEXnrfoQx1jJBRf8CAVQ0pBXGclWKbd kLc4aNHii9gQWHS0xX8pAgY3rz5xSkolEM1e1C5PM1Ki8RqiLOCV1bYsxjti/8qR3Pfc xwOwgh2G0i9suJsZ49l4I2jpqe5md3Ui9JHCYv3X+Erch/epY1xtSmrEnfKHWeSMnFYz mg2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=12V9eNw/BHvKrDUbcOiIzhGySNxYs9W6d56STu3zUWU=; b=aDg+yCIrtkXqoASkQVkuHrW+fxSZ2wKPLQsgT5JDL4OMo2Y+Nq0KiX4elXb1nFVa2E gwCGCzzrImc7rPPb/ZsE+qjLNGBuci6aZRSAGg5CKzQG/fFpdhFGIL/Lv7+Gw8AHyBHG BGbj2eO0pGplGJ3rLrimg6YjgetM0a6U2vXYru9yqw4t1WsCmI9rUsUHOtNWtgtkSRmu CPc7d1T5H64K193K8G/lliX7jG8Abp3bZK8xDlx5uBTUa38wLEaRRFBRLLzYRtmf9bBE CvgfUkqRY/ecVf+RLZSA4ruQ1bH0kU2KWzOZmONjz9Akxd8Oe+wY+2/pqULUemknFpMv Qbsg== X-Gm-Message-State: AFqh2koK5URMnJlxV4XW9W0F1Zrerjw8uVZLYzxT6W/aLSLSt4e9GOxn 1m/vfQQntqKM0i9wW2LiHwm24gbQsy4= X-Google-Smtp-Source: AMrXdXv2a4Ge4znFDb/RURUXRUuYxKH4VBbtyCpQnA77B9Re9QKz84k3H7fnKLhCtcuy8hNfeBLZdvwzq5I= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:200:f7b0:20e8:ce66:f98]) (user=surenb job=sendgmr) by 2002:a25:9d85:0:b0:7b6:c2e5:364e with SMTP id v5-20020a259d85000000b007b6c2e5364emr3276396ybp.201.1674689771597; Wed, 25 Jan 2023 15:36:11 -0800 (PST) Date: Wed, 25 Jan 2023 15:35:53 -0800 In-Reply-To: <20230125233554.153109-1-surenb@google.com> Mime-Version: 1.0 References: <20230125233554.153109-1-surenb@google.com> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog Message-ID: <20230125233554.153109-7-surenb@google.com> Subject: [PATCH v3 6/7] mm: introduce mod_vm_flags_nolock and use it in untrack_pfn From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: michel@lespinasse.org, jglisse@google.com, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, mgorman@techsingularity.net, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, peterz@infradead.org, ldufour@linux.ibm.com, paulmck@kernel.org, mingo@redhat.com, will@kernel.org, luto@kernel.org, songliubraving@fb.com, peterx@redhat.com, david@redhat.com, dhowells@redhat.com, hughd@google.com, bigeasy@linutronix.de, kent.overstreet@linux.dev, punit.agrawal@bytedance.com, lstoakes@gmail.com, peterjung1337@gmail.com, rientjes@google.com, axelrasmussen@google.com, joelaf@google.com, minchan@google.com, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@google.com, hughlynch@google.com, leewalsh@google.com, posk@google.com, linux-mm@kvack.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, x86@kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com, surenb@google.com X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: shodttsy1qpzw44d9swpz1muo9sem9rr X-Rspamd-Queue-Id: 780714000B X-HE-Tag: 1674689772-398347 X-HE-Meta: U2FsdGVkX1/o5r2vXOAT4uOUPMvMKISQFholYqURwoX3GR75F1s5ri5u0Xvwazs5ctmkN9Z+mp14NmVbyKnmqT3AkHwn7yWVCRvezPLRJDASPifG02kGsDqNttEvqKhlirTGJxdOMkUmwwZpz+uAdixQN8/aVeKuuZ1Xd0tjYyj80EZXmHU3CsVkuCvjH5bvo8MboIZAtaDKa0PlHWhk1zKfJkvPg4XXbW+jhUvAP8VXqriR/B3NGP1sND1CchTeLeEWhWNryQccByw/UQfu99ZQm/Euj9fjR83mYJwd6im67kCwU2AS+SSFAiRhAEpV/BMb/dbtAV0pMlVTpOoQZnrHSB/GLhnPyCCvroO9dJgfTDQ/HFB/y70f3sgkBBS+az7KeiFglPdZl3CzMFa9B1k056je2L5BKR6ree1rZ9zQir97Ovl3XZopaIg1TomnGXA4eioBTDCZTPEn7ZKMoyVyDx2MYFCnGxEdxS7h+qb5SZ0eiC4TDkJJJXSZhloHIdXXtfxoy6pV61a0b8gVmEb/WHlW0wKEHFuahU9MKzP3NitD/qOwA5D1ISb3ULZTnLl3KMa9gbSSezWjx5VD9FafH0W3/FScG6nU+tOiedgSmbUWZaDfxzKjjB0iw/7eDtShTjc09KDzBnb2k/GVaDQsO4yXDB7SH5j5gNwG0eVOK8uIEu5W6Brzm/aCez0L+J8QS8KS6jGvR6J3rfOaYgfbpZLDFyKuK+KcknKjxvYog/Vbga+IRnIF+WrLY7t2WN/nsDBbYWolnFeV+NW4+EV2RvuijtAqsrBFF3PRkAFNWCMD4BSepoLaOBaf1uSYfedWMZJtT4KniWr81iSnaQKfdEkZ2bGQyKLAJE6wK+HtJr1gybrSHw5TgEnrGJ4S/Rn0dkFOeAkfAuN9pLKXKWRlO5yHdCx5JKwPTMsTQuTpYqrjT/m57M0BGLr4r7Q/m4Y8r7uG9wcTI9fL7eX ABLwLoCY JOqV8sAaJgOCWFKoK9rC2v+/rPOAwtKZcuDyeSjbugL+764ItP4VaeeYB0ydvDq63puQvugU8TOhNp0ijtgWcO9HQV2U4I0Z1PH7cp7CQeREth+JVmwCXeOIw3CyGJoJ7YO1EHNly3eXCTZLrQJgRYBHNkG6kw5XKc3JLimob0g+wXiUK6sEro6mGmMuC1mYzVlVWvLZlzJILYLP1vF8RI9PYec6qY29OGQXEH+zfjpDRFctAozgeV9sBbjZptu5vLIz70XdeNAG3XMD5LYGANMAm68wDfmoWAgN1fMmMzK9MiFh1ONl1N6cnw4CBv0NDAL8w2h/WG1Gbx9zbyk4PdZGlcgUZtwLNAgTv0UhF/8o2M8d4Z7VP7kNv1CmIsJaO2OKdFX7LW18T5EDJsYO2oyspBO6WSk9V2Zlv7tqZ5hS9L6X7OuJ09ugPbFakrxq13Wp/+xB8Ha2FVFfemQi0UBjEvVDEqAKisQvWyBj4SySGgVfm6yX9BPU54Hq7EsJMx4BAe0BGB4/FoNBLRfJA9Hms+aAQvKTnRmfD9NGItCHZnwsKhFhu87HdbPWq0QD2d+7Ozjmjj8A6RUwmR+JHYIFWCg4afinWNwn0GE3/kBgp2HwfBXZtAl+2Hw6xuWQQwgzzc9oiw6OkaKfF8Wxt0JQcR/z7AIEoaWB5ljQzveYuFoM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: In cases when VMA flags are modified after VMA was isolated and mmap_lock was downgraded, flags modifications would result in an assertion because mmap write lock is not held. Introduce mod_vm_flags_nolock to be used in such situation, when VMA is not part of VMA tree and locking it is not required. Pass a hint to untrack_pfn to conditionally use mod_vm_flags_nolock for flags modification and to avoid assertion. Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko --- arch/x86/mm/pat/memtype.c | 10 +++++++--- include/linux/mm.h | 16 +++++++++++++--- include/linux/pgtable.h | 5 +++-- mm/memory.c | 13 +++++++------ mm/memremap.c | 4 ++-- mm/mmap.c | 16 ++++++++++------ 6 files changed, 42 insertions(+), 22 deletions(-) diff --git a/arch/x86/mm/pat/memtype.c b/arch/x86/mm/pat/memtype.c index ae9645c900fa..d8adc0b42cf2 100644 --- a/arch/x86/mm/pat/memtype.c +++ b/arch/x86/mm/pat/memtype.c @@ -1046,7 +1046,7 @@ void track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, pfn_t pfn) * can be for the entire vma (in which case pfn, size are zero). */ void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn, - unsigned long size) + unsigned long size, bool mm_wr_locked) { resource_size_t paddr; unsigned long prot; @@ -1065,8 +1065,12 @@ void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn, size = vma->vm_end - vma->vm_start; } free_pfn_range(paddr, size); - if (vma) - clear_vm_flags(vma, VM_PAT); + if (vma) { + if (mm_wr_locked) + clear_vm_flags(vma, VM_PAT); + else + mod_vm_flags_nolock(vma, 0, VM_PAT); + } } /* diff --git a/include/linux/mm.h b/include/linux/mm.h index 1ab5f73360f2..86bf043136f3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -656,12 +656,22 @@ static inline void clear_vm_flags(struct vm_area_struct *vma, ACCESS_PRIVATE(vma, __vm_flags) &= ~flags; } +/* + * Use only if VMA has been previously isolated, is not part of the VMA tree + * and therefore needs no locking. + */ +static inline void mod_vm_flags_nolock(struct vm_area_struct *vma, + vm_flags_t set, vm_flags_t clear) +{ + ACCESS_PRIVATE(vma, __vm_flags) |= set; + ACCESS_PRIVATE(vma, __vm_flags) &= ~clear; +} + static inline void mod_vm_flags(struct vm_area_struct *vma, vm_flags_t set, vm_flags_t clear) { mmap_assert_write_locked(vma->vm_mm); - ACCESS_PRIVATE(vma, __vm_flags) |= set; - ACCESS_PRIVATE(vma, __vm_flags) &= ~clear; + mod_vm_flags_nolock(vma, set, clear); } static inline void vma_set_anonymous(struct vm_area_struct *vma) @@ -2087,7 +2097,7 @@ static inline void zap_vma_pages(struct vm_area_struct *vma) } void unmap_vmas(struct mmu_gather *tlb, struct maple_tree *mt, struct vm_area_struct *start_vma, unsigned long start, - unsigned long end); + unsigned long end, bool mm_wr_locked); struct mmu_notifier_range; diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 5fd45454c073..c63cd44777ec 100644 --- a/include/linux/pgtable.h +++ b/include/linux/pgtable.h @@ -1185,7 +1185,8 @@ static inline int track_pfn_copy(struct vm_area_struct *vma) * can be for the entire vma (in which case pfn, size are zero). */ static inline void untrack_pfn(struct vm_area_struct *vma, - unsigned long pfn, unsigned long size) + unsigned long pfn, unsigned long size, + bool mm_wr_locked) { } @@ -1203,7 +1204,7 @@ extern void track_pfn_insert(struct vm_area_struct *vma, pgprot_t *prot, pfn_t pfn); extern int track_pfn_copy(struct vm_area_struct *vma); extern void untrack_pfn(struct vm_area_struct *vma, unsigned long pfn, - unsigned long size); + unsigned long size, bool mm_wr_locked); extern void untrack_pfn_moved(struct vm_area_struct *vma); #endif diff --git a/mm/memory.c b/mm/memory.c index d6902065e558..5b11b50e2c4a 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1613,7 +1613,7 @@ void unmap_page_range(struct mmu_gather *tlb, static void unmap_single_vma(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start_addr, unsigned long end_addr, - struct zap_details *details) + struct zap_details *details, bool mm_wr_locked) { unsigned long start = max(vma->vm_start, start_addr); unsigned long end; @@ -1628,7 +1628,7 @@ static void unmap_single_vma(struct mmu_gather *tlb, uprobe_munmap(vma, start, end); if (unlikely(vma->vm_flags & VM_PFNMAP)) - untrack_pfn(vma, 0, 0); + untrack_pfn(vma, 0, 0, mm_wr_locked); if (start != end) { if (unlikely(is_vm_hugetlb_page(vma))) { @@ -1675,7 +1675,7 @@ static void unmap_single_vma(struct mmu_gather *tlb, */ void unmap_vmas(struct mmu_gather *tlb, struct maple_tree *mt, struct vm_area_struct *vma, unsigned long start_addr, - unsigned long end_addr) + unsigned long end_addr, bool mm_wr_locked) { struct mmu_notifier_range range; struct zap_details details = { @@ -1689,7 +1689,8 @@ void unmap_vmas(struct mmu_gather *tlb, struct maple_tree *mt, start_addr, end_addr); mmu_notifier_invalidate_range_start(&range); do { - unmap_single_vma(tlb, vma, start_addr, end_addr, &details); + unmap_single_vma(tlb, vma, start_addr, end_addr, &details, + mm_wr_locked); } while ((vma = mas_find(&mas, end_addr - 1)) != NULL); mmu_notifier_invalidate_range_end(&range); } @@ -1723,7 +1724,7 @@ void zap_page_range_single(struct vm_area_struct *vma, unsigned long address, * unmap 'address-end' not 'range.start-range.end' as range * could have been expanded for hugetlb pmd sharing. */ - unmap_single_vma(&tlb, vma, address, end, details); + unmap_single_vma(&tlb, vma, address, end, details, false); mmu_notifier_invalidate_range_end(&range); tlb_finish_mmu(&tlb); } @@ -2492,7 +2493,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr, err = remap_pfn_range_notrack(vma, addr, pfn, size, prot); if (err) - untrack_pfn(vma, pfn, PAGE_ALIGN(size)); + untrack_pfn(vma, pfn, PAGE_ALIGN(size), true); return err; } EXPORT_SYMBOL(remap_pfn_range); diff --git a/mm/memremap.c b/mm/memremap.c index 08cbf54fe037..2f88f43d4a01 100644 --- a/mm/memremap.c +++ b/mm/memremap.c @@ -129,7 +129,7 @@ static void pageunmap_range(struct dev_pagemap *pgmap, int range_id) } mem_hotplug_done(); - untrack_pfn(NULL, PHYS_PFN(range->start), range_len(range)); + untrack_pfn(NULL, PHYS_PFN(range->start), range_len(range), true); pgmap_array_delete(range); } @@ -276,7 +276,7 @@ static int pagemap_range(struct dev_pagemap *pgmap, struct mhp_params *params, if (!is_private) kasan_remove_zero_shadow(__va(range->start), range_len(range)); err_kasan: - untrack_pfn(NULL, PHYS_PFN(range->start), range_len(range)); + untrack_pfn(NULL, PHYS_PFN(range->start), range_len(range), true); err_pfn_remap: pgmap_array_delete(range); return error; diff --git a/mm/mmap.c b/mm/mmap.c index 2c6e9072e6a8..69d440997648 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -78,7 +78,7 @@ core_param(ignore_rlimit_data, ignore_rlimit_data, bool, 0644); static void unmap_region(struct mm_struct *mm, struct maple_tree *mt, struct vm_area_struct *vma, struct vm_area_struct *prev, struct vm_area_struct *next, unsigned long start, - unsigned long end); + unsigned long end, bool mm_wr_locked); static pgprot_t vm_pgprot_modify(pgprot_t oldprot, unsigned long vm_flags) { @@ -2136,14 +2136,14 @@ static inline void remove_mt(struct mm_struct *mm, struct ma_state *mas) static void unmap_region(struct mm_struct *mm, struct maple_tree *mt, struct vm_area_struct *vma, struct vm_area_struct *prev, struct vm_area_struct *next, - unsigned long start, unsigned long end) + unsigned long start, unsigned long end, bool mm_wr_locked) { struct mmu_gather tlb; lru_add_drain(); tlb_gather_mmu(&tlb, mm); update_hiwater_rss(mm); - unmap_vmas(&tlb, mt, vma, start, end); + unmap_vmas(&tlb, mt, vma, start, end, mm_wr_locked); free_pgtables(&tlb, mt, vma, prev ? prev->vm_end : FIRST_USER_ADDRESS, next ? next->vm_start : USER_PGTABLES_CEILING); tlb_finish_mmu(&tlb); @@ -2391,7 +2391,11 @@ do_vmi_align_munmap(struct vma_iterator *vmi, struct vm_area_struct *vma, mmap_write_downgrade(mm); } - unmap_region(mm, &mt_detach, vma, prev, next, start, end); + /* + * We can free page tables without write-locking mmap_lock because VMAs + * were isolated before we downgraded mmap_lock. + */ + unmap_region(mm, &mt_detach, vma, prev, next, start, end, !downgrade); /* Statistics and freeing VMAs */ mas_set(&mas_detach, start); remove_mt(mm, &mas_detach); @@ -2704,7 +2708,7 @@ unsigned long mmap_region(struct file *file, unsigned long addr, /* Undo any partial mapping done by a device driver. */ unmap_region(mm, &mm->mm_mt, vma, prev, next, vma->vm_start, - vma->vm_end); + vma->vm_end, true); } if (file && (vm_flags & VM_SHARED)) mapping_unmap_writable(file->f_mapping); @@ -3031,7 +3035,7 @@ void exit_mmap(struct mm_struct *mm) tlb_gather_mmu_fullmm(&tlb, mm); /* update_hiwater_rss(mm) here? but nobody should be looking */ /* Use ULONG_MAX here to ensure all VMAs in the mm are unmapped */ - unmap_vmas(&tlb, &mm->mm_mt, vma, 0, ULONG_MAX); + unmap_vmas(&tlb, &mm->mm_mt, vma, 0, ULONG_MAX, false); mmap_read_unlock(mm); /*