android_kernel_msm-6.1_noth.../drivers/android
Carlos Llamas cac827f261 ANDROID: binder: fix race in priority restore
During a reply, the target gets woken up and then the priority of the
replier is restored. The order is such to allow the target to process
the reply ASAP. Otherwise, we risk the sender getting scheduled out
before the wakeup happens. This strategy reduces transaction latency.

However, a subsequent transaction from the same target could be started
before the priority of the replier gets restored. At this point we save
the wrong priority and it gets reinstated at the end of the transaction.

This patch allows the incoming transaction to detect the race condition
and save the correct next priority. Additionally, the replier will abort
its pending priority restore which allows the new transaction to always
run at the desired priority.

Bug: 148101660
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I6fec41ae1a1342023f78212ab1f984e26f068221
2022-06-09 03:58:46 +00:00
..
binder.c ANDROID: binder: fix race in priority restore 2022-06-09 03:58:46 +00:00
binder_alloc.c drivers/android: remove redundant ret variable 2022-02-04 15:40:44 +01:00
binder_alloc.h binder: tell userspace to dump current backtrace when detected oneway spamming 2021-04-10 10:52:04 +02:00
binder_alloc_selftest.c binder: print warnings when detecting oneway spamming. 2020-09-03 18:24:41 +02:00
binder_internal.h ANDROID: binder: fix race in priority restore 2022-06-09 03:58:46 +00:00
binder_trace.h Merge 2911ed9f47 ("Merge tag 'char-misc-5.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc") into android-mailine 2020-12-17 12:56:04 +01:00
binderfs.c binderfs: add support for feature files 2021-07-21 13:46:36 +02:00
debug_kinfo.c ANDROID: kernel: fix debug_kinfo set twice crash issue 2022-05-17 20:48:53 +08:00
debug_kinfo.h ANDROID: debug_kinfo driver, move to drivers/android 2022-04-13 13:42:33 +02:00
Kconfig ANDROID: debug_kinfo driver, move to drivers/android 2022-04-13 13:42:33 +02:00
Makefile ANDROID: debug_kinfo driver, move to drivers/android 2022-04-13 13:42:33 +02:00
vendor_hooks.c Revert "ANDROID: timer: Add vendor hook for timer calc index" 2022-06-04 18:12:53 +02:00