Skip to content
Commit 60d48857 authored by Tyler Hicks's avatar Tyler Hicks Committed by Greg Kroah-Hartman
Browse files

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 3013bf62
("binder: reduce mmap_sem write-side lock"). That change was
inadvertently reverted by commit 5cec2d2e ("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: 5cec2d2e

 ("binder: fix race between munmap() and direct reclaim")
Signed-off-by: default avatarTyler Hicks <tyhicks@canonical.com>
Acked-by: default avatarTodd Kjos <tkjos@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e60e9a4b
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