Thread (60 messages) flat view 60 messages, 8 authors, 2026-03-11

Re: [PATCH v1 10/16] mm/memory: use __zap_vma_range() in zap_vma_for_reaping()

From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: 2026-03-11 08:18:56
Also in: bpf, dri-devel, intel-gfx, kvm, linux-fsdevel, linux-mm, linux-perf-users, linux-rdma, linux-s390, lkml, netdev, rust-for-linux

On 3/6/26 13:26, Lorenzo Stoakes (Oracle) wrote:
On Fri, Feb 27, 2026 at 09:08:41PM +0100, David Hildenbrand (Arm) wrote:
quoted
Let's call __zap_vma_range() instead of unmap_page_range() to prepare
for further cleanups.

To keep the existing behavior, whereby we do not call uprobe_munmap()
which could block, add a new "reaping" member to zap_details and use it.
I am always in favour of making further use of helper structs :)
quoted
Likely we should handle the possible blocking in uprobe_munmap()
differently, but for now keep it unchanged.

Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
OK this looks like it's doing the equivalent of what was there before, so:

Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
[...]
quoted
@@ -2111,11 +2115,12 @@ static void __zap_vma_range(struct mmu_gather *tlb, struct vm_area_struct *vma,
  */
 int zap_vma_for_reaping(struct vm_area_struct *vma)
 {
+	struct zap_details details = {
+		.reaping = true,
+	};
 	struct mmu_notifier_range range;
 	struct mmu_gather tlb;

-	VM_WARN_ON_ONCE(is_vm_hugetlb_page(vma));
-
I guess because you've moved this safety check into __zap_vma_range()?
Yes exactly, considered the change too trivial to mention it in the
patch description.

Thanks!

-- 
Cheers,

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help