From patchwork Thu Jan 26 19:37:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suren Baghdasaryan X-Patchwork-Id: 13117676 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 47486C05027 for ; Thu, 26 Jan 2023 19:45:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D9CE36B0073; Thu, 26 Jan 2023 14:45:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D4CBA6B0078; Thu, 26 Jan 2023 14:45:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BEDEF6B007B; Thu, 26 Jan 2023 14:45:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id B20336B0073 for ; Thu, 26 Jan 2023 14:45:15 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 7B898A01D4 for ; Thu, 26 Jan 2023 19:45:15 +0000 (UTC) X-FDA: 80397978990.19.A56251E Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) by imf07.hostedemail.com (Postfix) with ESMTP id 97F0840017 for ; Thu, 26 Jan 2023 19:45:13 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=m73DxO9j; spf=pass (imf07.hostedemail.com: domain of 3otbSYwYKCL8xzwjsglttlqj.htrqnsz2-rrp0fhp.twl@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3otbSYwYKCL8xzwjsglttlqj.htrqnsz2-rrp0fhp.twl@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=1674762313; 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=ZiBPU+eDHOqkXMrsDufSC0gz6UzIoIV8gCa/IcOfB+E=; b=ajvCVjGQEbK/0AF0KYWoYUMTGfi+QYMZdPapAmo2AA6lO1kNF9tqmVioNLoGQWdke9PCDY d2JoH8l0tnf/gjkTpCPUjoz2ycD6MRjWIB+oHonj0dBSIxCWLjTVXxqDjXA35W8VlnDCG7 bCepEtknYf+vsIStGSVFjk94EWL4qlI= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=m73DxO9j; spf=pass (imf07.hostedemail.com: domain of 3otbSYwYKCL8xzwjsglttlqj.htrqnsz2-rrp0fhp.twl@flex--surenb.bounces.google.com designates 209.85.128.202 as permitted sender) smtp.mailfrom=3otbSYwYKCL8xzwjsglttlqj.htrqnsz2-rrp0fhp.twl@flex--surenb.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1674762313; a=rsa-sha256; cv=none; b=04jPQRvq2vE95FeqFkcZha719OXeHz3o8+sXJUCDnAGjYCjxAeIuBkqQTw+JvKb3/pB1Pr ZCXLL7nWontCbYbTdb4zi1qy3EUs8I/fvWvSRK04RZ/eSwLRiPa11fPQepSV4k3UEN6h7x rhQQo8GRfBXHuA0cZW6TC2hWnYw8ij0= Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-434eb7c6fa5so31623407b3.14 for ; Thu, 26 Jan 2023 11:45:13 -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=ZiBPU+eDHOqkXMrsDufSC0gz6UzIoIV8gCa/IcOfB+E=; b=m73DxO9jMvetXVPEszi0Jq7mi01vVVgt0BZIvBznYhv6ivS8hm7+23OxZRlC61JcUZ BHwUuqPCw+b5nazQInMzzi3+biojKImVBuXc30nFSw1PLF1kt5V7xEaZCKfimLJL93+9 TVAzPsoC/CDsJzMhAqE/M7vA04soveCg9rschI+7VItGY4S7zAYu3W7Gmg5yVd0plpnO wz0yONbTGqZ76kWnjIRpBT4RqBUiZM9/aVjX1vovX5GCHpHkfG3oBQGTqt4kRKcg15yB xy9oqMlpTp7XCjAgCH87WkHAOrFK2I8Q2mUGM8JqhUbfsRh7aHMWsVJQdO5n/1nFv+h0 54Aw== 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=ZiBPU+eDHOqkXMrsDufSC0gz6UzIoIV8gCa/IcOfB+E=; b=2Plv+xOVafwTxxdK/DiqQUeQKrsmGVwmlvlYEvrL7fbxNHbHltUQrA1SFx85AvUxAy JY2r/EBQa+k3c5hs6M+Gewke/4W5j/x8gWF1DcFtKUMX/fazYLI6h9oFy/8vUFbGAkeN maexYqdJ0KJTOHcohYsGo6vQ2OfQqSMW6JcUUeKDt8KiVJv5NGtWEAkbEelnmeunC06I TTlV5oUgsu4WdbMhRLMNwrh5M6pknYIxEQ6LOmKYIW5twgzTI6Rp0OMWrj+e/3qU+X8k VIzD2aeXYTl9Lw/V30UkIFLKq3naMMUQmShAyKeu5n5dmz34VDE1jcPRcbAG4RBsdA22 7c6Q== X-Gm-Message-State: AFqh2koDhtC03K7geIuCS5JNGwBdodo62ttVQfsnJQxIRsE/iQ61CXUP wGRdMzDPE0LhyCW7QoO2m1XhGG/55ys= X-Google-Smtp-Source: AMrXdXt20QRkRihGWlEdRJDhT+YO7v3lUpepK3uuj9V92kEGUFyRzloVkr71qHyKbWGH8sK+KSDR5LyhftY= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:200:d774:88af:bab3:648d]) (user=surenb job=sendgmr) by 2002:a5b:684:0:b0:804:cc8:dea3 with SMTP id j4-20020a5b0684000000b008040cc8dea3mr2587550ybq.451.1674761890401; Thu, 26 Jan 2023 11:38:10 -0800 (PST) Date: Thu, 26 Jan 2023 11:37:51 -0800 In-Reply-To: <20230126193752.297968-1-surenb@google.com> Mime-Version: 1.0 References: <20230126193752.297968-1-surenb@google.com> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog Message-ID: <20230126193752.297968-7-surenb@google.com> Subject: [PATCH v4 6/7] mm: introduce __vm_flags_mod 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, rppt@kernel.org, jannh@google.com, shakeelb@google.com, tatashin@google.com, edumazet@google.com, gthelen@google.com, gurua@google.com, arjunroy@google.com, soheil@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: rspam04 X-Rspamd-Queue-Id: 97F0840017 X-Stat-Signature: s68xr4wjhps74g1nzs5n8cyc1upng5td X-HE-Tag: 1674762313-557015 X-HE-Meta: U2FsdGVkX18S+j1mZPAOYc7Y81UulG2fRTiBqny+FJYOV9BUY4ESSw/wKO+FxPWcz6a4HlZ36u7dxfbaqbDfsGvBbrZKpdX7ZksbdEEf8cJ9Wr47mgwQsaZugQtkqLS5wxgDTsELdxGdX9ZnegiLX53MMUpqg08VEVJ5nbv2B5N05JmJjtlwkLxjBOd2CLigUlEp6gqrOSCTKXavy7repxwUhJfKdr0/DI1OUf2kiIcFNnTQKrIqBXoMfeMt4UIoWlcTMs2mwdTQtMaXDm8O1yv6knMibGfY6WWDF9Sn3FzoQp4Qo2XjHBVCQs5SLc35vUlXbGQYopBavBRtoJJTjIgPSXIA84U9Co57lYwQdQ6OCLNF9gbbVbgI+kADaxKBDuMfk4CtUfAo9By9Jn1KGcxyJ0kqmPauh72J2lQ0C9k01JfjK75Qibx9Z6J1ywXeaTz8/VU0vSiel5gO1BP22nhNxM1awN8h8m1XP3F9iwFsZJ/JhS2Cvbil4wmos4KkIDmaIHAmraMGj5j3WZ8WRe5FScVtG+g4KbI+YMVuLCxAUYOQOtn1A9vXVcgWaqOkD5B/iDwlEgm+iB/kerVfgYpLHOdi0FF+V6zTTPgQYSCjobX3T7BsiddByfMMOBj9sKjy3gSLG0ypqbR2p1BAJvbJC/sUg4uvJayCla+/g3kXNiNNCkpS2hVkYktZorgbXNdHsa8IfRUO6Xb19N2uoiT4p2POnL7+swDxZ54HLYM0KXLL9fNYNuPnvU72XEt2OAp0KB640V22PIZYRTMt1Nctbx7PbUhL2X7S0q0AaZO9sJDeog4d0hFYu05oxMqIuKLqkeAT+UMOJ2FInNf4Ewi7hCs3+DlVjTe6/ocWLTFOZCyATvweBsPKI/XYsTvXuD8kOsgvCKWOIzTA9h55gIG1eIC0pjEhLI98bfoqV+wrZwpvxNzVC5Krb7upx1C0R274hFe0nbgLL4ejD10 5g60KfY3 y81p+t8cYU9conxS8Xil64gG5tknumpKG6bAY0nqEdoWwuawT2y/OA+zTShRlmMLtbIRmuIfR6GEzZuQspBmq0YA0zKWpgds2PHRrKryfrtCYo4Lp7JUT4TFNgRzfu2aKoSrxWMVhIolDPrkVFaQMuCTqXDB86RgT4ZtgPudwhjsDcDXAIO1XfUFdQWbvOc+uCWrC/VAaZb6vlVs+c4wjtjo40SysxCcb2thJe6qcmF6F9V9y+JlGj0W+iOZQoRlJA0xeBSkdnw35dmcF3RksWkHqR2rvngPmUN6zjYnypxdSVFznhuAciWNWjlwkCtsu37rSSBdhDAF2tJhh+9bLEtr02z9JaWN4jVZk0dXc6oPCjsJ/o+OSENG7JREL/Q+f7hDooja08+mklztkvAq7dEtalWO5rZAQWKCxIBVDcVcOWc5twt9XDtItsLBxwrWXwjakCG/0a+qKRiH0dqSNHDucf4/V1t6IlgJeWlF+aG7cCxeAquJoSIsQzZpEl5u3F5rTxXLjys7QRO6gfTCx/+flbBLVNClfEH7pArp8+ua3uxAG7k8EwFOsLkfTyhjUqgtsWTyByKkopZO3LG0RFyBrp+36KNuo+BerGwuAe+al3FjpjyqHB1vbNGCu3op3gwIWqGDZ7CDWuKc/9drgkXfJ4/RBsM2PHPTZobL5cJF6l6DXpDUlThSO2WP2xhaLKedVLy8wC+aQ4r0JtnH0AS73+SwZpM54cfLhIPWVaT09KX0= 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: There are scenarios when vm_flags can be modified without exclusive mmap_lock, such as: - after VMA was isolated and mmap_lock was downgraded or dropped - in exit_mmap when there are no other mm users and locking is unnecessary Introduce __vm_flags_mod to avoid assertions when the caller takes responsibility for the required locking. Pass a hint to untrack_pfn to conditionally use __vm_flags_mod for flags modification to avoid assertion. Signed-off-by: Suren Baghdasaryan Acked-by: Michal Hocko --- arch/x86/mm/pat/memtype.c | 10 +++++++--- include/linux/mm.h | 14 ++++++++++++-- include/linux/pgtable.h | 5 +++-- mm/memory.c | 13 +++++++------ mm/memremap.c | 4 ++-- mm/mmap.c | 16 ++++++++++------ 6 files changed, 41 insertions(+), 21 deletions(-) diff --git a/arch/x86/mm/pat/memtype.c b/arch/x86/mm/pat/memtype.c index 6ca51b1aa5d9..691bf8934b6f 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) - vm_flags_clear(vma, VM_PAT); + if (vma) { + if (mm_wr_locked) + vm_flags_clear(vma, VM_PAT); + else + __vm_flags_mod(vma, 0, VM_PAT); + } } /* diff --git a/include/linux/mm.h b/include/linux/mm.h index 3c7fc3ecaece..a00fdeb4492d 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -656,6 +656,16 @@ static inline void vm_flags_clear(struct vm_area_struct *vma, ACCESS_PRIVATE(vma, __vm_flags) &= ~flags; } +/* + * Use only if VMA is not part of the VMA tree or has no other users and + * therefore needs no locking. + */ +static inline void __vm_flags_mod(struct vm_area_struct *vma, + vm_flags_t set, vm_flags_t clear) +{ + vm_flags_init(vma, (vma->vm_flags | set) & ~clear); +} + /* * Use only when the order of set/clear operations is unimportant, otherwise * use vm_flags_{set|clear} explicitly. @@ -664,7 +674,7 @@ static inline void vm_flags_mod(struct vm_area_struct *vma, vm_flags_t set, vm_flags_t clear) { mmap_assert_write_locked(vma->vm_mm); - vm_flags_init(vma, (vma->vm_flags | set) & ~clear); + __vm_flags_mod(vma, set, clear); } static inline void vma_set_anonymous(struct vm_area_struct *vma) @@ -2102,7 +2112,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 a6316cda0e87..7a04a1130ec1 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 3d9b14d5f933..429e42c8fccc 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); /*