android_kernel_xiaomi_sm8350/drivers/android
Carlos Llamas 012ab662e2 ANDROID: binder: fix pending prio state for early exit
When calling binder_do_set_priority() with the same policy and priority
values as the current task, we exit early since there is nothing to do.
However, the BINDER_PRIO_PENDING state might be set and in this case we
fail to update it. A subsequent call to binder_transaction_priority()
will then read an incorrect state and save the wrong priority. Fix this
by setting thread->prio_state to BINDER_PRIO_SET on our way out.

Bug: 199309216
Fixes: cac827f2619b ("ANDROID: binder: fix race in priority restore")
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I21e906cf4b2ebee908af41fe101ecd458ae1991c
(cherry picked from commit 72193be6d4bd9ad29dacd998c14dff97f7a6c6c9)
2022-08-03 16:21:47 +00:00
..
binder_alloc_selftest.c
binder_alloc.c UPSTREAM: binder: fix async_free_space accounting for empty parcels 2022-01-31 14:15:02 -08:00
binder_alloc.h
binder_internal.h ANDROID: binder: fix race in priority restore 2022-08-03 16:21:47 +00:00
binder_trace.h
binder.c ANDROID: binder: fix pending prio state for early exit 2022-08-03 16:21:47 +00:00
binderfs.c
Kconfig
Makefile
vendor_hooks.c ANDROID: Add vendor hooks when syscall prctl finished 2021-03-09 21:57:07 +00:00