Split out the insertion of pages to be outside of the alloc->mutex in a separate binder_install_buffer_pages() routine. Since this is no longer serialized, we must look at the full range of pages used by the buffers. The installation is protected with mmap_sem in write mode since multiple tasks might race to install the same page. Besides avoiding unnecessary nested locking this helps in preparation of switching the alloc->mutex into a spinlock_t in subsequent patches. Signed-off-by: Carlos Llamas <cmllamas@google.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20231201172212.1813387-20-cmllamas@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Bug: 254650075 (cherry picked from commit 37ebbb4f73a0d299fa0c7dd043932a2f5fbbb779) Change-Id: I7b0684310b8824194d7e4a51a1fd67944f8ec06a Signed-off-by: Carlos Llamas <cmllamas@google.com> |
||
|---|---|---|
| .. | ||
| android_debug_symbols.c | ||
| binder.c | ||
| binder_alloc.c | ||
| binder_alloc.h | ||
| binder_alloc_selftest.c | ||
| binder_internal.h | ||
| binder_trace.h | ||
| binderfs.c | ||
| debug_kinfo.c | ||
| debug_kinfo.h | ||
| Kconfig | ||
| Makefile | ||
| vendor_hooks.c | ||