Merge android14-6.1-2024-06_r4 into HEAD

* commit 'b6577b7604810030b5df09106f713e998ad24ea9':
  ANDROID: 16K: Avoid mmap lock assertions for padding VMAs

Change-Id: I41c7c4bdac59d142faff1341f88fac574dc50133
Signed-off-by: keystone-kernel-automerger <keystone-kernel-automerger@google.com>
This commit is contained in:
keystone-kernel-automerger 2024-07-12 06:22:26 +00:00
commit 16ec86700b

View File

@ -294,11 +294,14 @@ struct vm_area_struct *get_pad_vma(struct vm_area_struct *vma)
/* Adjust the start to begin at the start of the padding section */
pad->vm_start = VMA_PAD_START(pad);
/*
* The below modifications to vm_flags don't need mmap write lock,
* since, pad does not belong to the VMA tree.
*/
/* Make the pad vma PROT_NONE */
vm_flags_clear(pad, VM_READ|VM_WRITE|VM_EXEC);
__vm_flags_mod(pad, 0, VM_READ|VM_WRITE|VM_EXEC);
/* Remove padding bits */
vm_flags_clear(pad, VM_PAD_MASK);
__vm_flags_mod(pad, 0, VM_PAD_MASK);
return pad;
}