Commit c691ab2c authored by Suren Baghdasaryan's avatar Suren Baghdasaryan Committed by Treehugger Robot
Browse files

ANDROID: look up vma under RCU in linker_ctx()

madvise_dontneed_single_vma() calls linker_ctx() to detect whether the
madvise was initiated by the dynamic linker. This function requires
mmap_lock in order to lookup the vma, however with recent changes we
do not hold mmap_lock while executing MADV_DONTNEED. Lookup the vma
under RCU instead to avoid lockdep warning.

Bug: 425827225
Bug: 441636500
Bug: 451778078
[add https://android-review.googlesource.com/c/kernel/common/+/3742271


and Replace down_read(&vma->vm_lock->lock) with BUG_ON(!vma_start_read_locked(vma)) because the vm_lock member was removed in Linux 6.12.]
Change-Id: Ie5e0243f359b96292d4f32ee3299050b871dc6c5
Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
parent 98712097
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment