linux/drivers/android
Tyler Hicks 60d4885710 binder: take read mode of mmap_sem in binder_alloc_free_page()
Restore the behavior of locking mmap_sem for reading in
binder_alloc_free_page(), as was first done in commit 3013bf62b6
("binder: reduce mmap_sem write-side lock"). That change was
inadvertently reverted by commit 5cec2d2e58 ("binder: fix race between
munmap() and direct reclaim").

In addition, change the name of the label for the error path to
accurately reflect that we're taking the lock for reading.

Backporting note: This fix is only needed when *both* of the commits
mentioned above are applied. That's an unlikely situation since they
both landed during the development of v5.1 but only one of them is
targeted for stable.

Fixes: 5cec2d2e58 ("binder: fix race between munmap() and direct reclaim")
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Todd Kjos <tkjos@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25 11:53:43 +02:00
..
binder_alloc_selftest.c binder: fix sparse issue in binder_alloc_selftest.c 2019-02-14 08:13:56 +01:00
binder_alloc.c binder: take read mode of mmap_sem in binder_alloc_free_page() 2019-04-25 11:53:43 +02:00
binder_alloc.h binder: use userspace pointer as base of buffer space 2019-02-12 10:43:57 +01:00
binder_internal.h binderfs: remove separate device_initcall() 2019-02-01 15:50:26 +01:00
binder_trace.h binder: use userspace pointer as base of buffer space 2019-02-12 10:43:57 +01:00
binder.c binder: fix BUG_ON found by selinux-testsuite 2019-03-21 06:50:47 +01:00
binderfs.c binderfs: remove separate device_initcall() 2019-02-01 15:50:26 +01:00
Kconfig binder: add functions to copy to/from binder buffers 2019-02-12 10:43:57 +01:00
Makefile binder: implement binderfs 2018-12-19 09:40:13 +01:00