Revert "ANDROID: mm: assert that mmap_lock is taken exclusively in vm_write_begin"

This reverts commit 51cfccaecd.

Change-Id: Iacc9012268a5e7aedfe38afd8766e84a042a30b5
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
This commit is contained in:
Alexander Winkowski 2024-01-12 04:56:11 +00:00
commit 1185e5aca1
No known key found for this signature in database
GPG key ID: 72762A66704CDE44

View file

@ -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.