Skip to content
Commit d6f35446 authored by Liam Howlett's avatar Liam Howlett Committed by Greg Kroah-Hartman
Browse files

binder_alloc: Add missing mmap_lock calls when using the VMA



Take the mmap_read_lock() when using the VMA in
binder_alloc_print_pages() and when checking for a VMA in
binder_alloc_new_buf_locked().

It is worth noting binder_alloc_new_buf_locked() drops the VMA read lock
after it verifies a VMA exists, but may be taken again deeper in the
call stack, if necessary.

Fixes: a43cfc87 (android: binder: stop saving a pointer to the VMA)
Cc: stable <stable@kernel.org>
Reported-by: default avatarOndrej Mosnacek <omosnace@redhat.com>
Reported-by: default avatar <syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com>
Tested-by: default avatarOndrej Mosnacek <omosnace@redhat.com>
Acked-by: default avatarCarlos Llamas <cmllamas@google.com>
Signed-off-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
Link: https://lore.kernel.org/r/20220810160209.1630707-1-Liam.Howlett@oracle.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a0e44c64
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment