linux-stable/drivers/android
Liam Howlett 44e602b4e5 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.

Link: https://lkml.kernel.org/r/20220810160209.1630707-1-Liam.Howlett@oracle.com
Fixes: a43cfc87ca (android: binder: stop saving a pointer to the VMA)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: Ondrej Mosnacek <omosnace@redhat.com>
Reported-by: <syzbot+a7b60a176ec13cafb793@syzkaller.appspotmail.com>
Acked-by: Carlos Llamas <cmllamas@google.com>
Tested-by: Ondrej Mosnacek <omosnace@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Christian Brauner (Microsoft) <brauner@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Hridya Valsaraju <hridya@google.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Martijn Coenen <maco@android.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: "Arve Hjønnevåg" <arve@android.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-08-28 14:02:44 -07:00
..
binder.c binder: fix redefinition of seq_file attributes 2022-07-08 15:44:19 +02:00
binder_alloc.c binder_alloc: add missing mmap_lock calls when using the VMA 2022-08-28 14:02:44 -07:00
binder_alloc.h android: binder: stop saving a pointer to the VMA 2022-07-29 18:07:13 -07:00
binder_alloc_selftest.c android: binder: stop saving a pointer to the VMA 2022-07-29 18:07:13 -07:00
binder_internal.h binder: fix redefinition of seq_file attributes 2022-07-08 15:44:19 +02:00
binder_trace.h Binder: add TF_UPDATE_TXN to replace outdated txn 2022-06-27 16:16:30 +02:00
binderfs.c binder: fix redefinition of seq_file attributes 2022-07-08 15:44:19 +02:00
Kconfig remove CONFIG_ANDROID 2022-07-01 10:41:09 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00