From 1185e5aca11c66840e37154dc3cf46f7d1a1e702 Mon Sep 17 00:00:00 2001 From: Alexander Winkowski Date: Fri, 12 Jan 2024 04:56:11 +0000 Subject: [PATCH] Revert "ANDROID: mm: assert that mmap_lock is taken exclusively in vm_write_begin" This reverts commit 51cfccaecd1813aff19b15f0ca65af12ddf36809. Change-Id: Iacc9012268a5e7aedfe38afd8766e84a042a30b5 Signed-off-by: Alexander Winkowski --- include/linux/mm.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 1a67be54dc47..0304a5241875 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1613,12 +1613,6 @@ int generic_access_phys(struct vm_area_struct *vma, unsigned long addr, #ifdef CONFIG_SPECULATIVE_PAGE_FAULT static inline void vm_write_begin(struct vm_area_struct *vma) { - /* - * Isolated vma might be freed without exclusive mmap_lock but - * speculative page fault handler still needs to know it was changed. - */ - if (!RB_EMPTY_NODE(&vma->vm_rb)) - WARN_ON_ONCE(!rwsem_is_locked(&(vma->vm_mm)->mmap_sem)); /* * The reads never spins and preemption * disablement is not required.