aboutsummaryrefslogtreecommitdiff
path: root/drivers/android/Kconfig
diff options
context:
space:
mode:
authorGravatar Sherry Yang <sherryy@android.com> 2018-08-13 17:28:53 -0700
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2018-09-14 15:22:36 +0200
commit44b73962cb25f1c8170ea695c4564b05a75e1fd4 (patch)
tree436aa789e351d151506dc95240b24b2b16360a15 /drivers/android/Kconfig
parentuio: convert to vm_fault_t (diff)
downloadlinux-44b73962cb25f1c8170ea695c4564b05a75e1fd4.tar.gz
linux-44b73962cb25f1c8170ea695c4564b05a75e1fd4.tar.bz2
linux-44b73962cb25f1c8170ea695c4564b05a75e1fd4.zip
android: binder: no outgoing transaction when thread todo has transaction
When a process dies, failed reply is sent to the sender of any transaction queued on a dead thread's todo list. The sender asserts that the received failed reply corresponds to the head of the transaction stack. This assert can fail if the dead thread is allowed to send outgoing transactions when there is already a transaction on its todo list, because this new transaction can end up on the transaction stack of the original sender. The following steps illustrate how this assertion can fail. 1. Thread1 sends txn19 to Thread2 (T1->transaction_stack=txn19, T2->todo+=txn19) 2. Without processing todo list, Thread2 sends txn20 to Thread1 (T1->todo+=txn20, T2->transaction_stack=txn20) 3. T1 processes txn20 on its todo list (T1->transaction_stack=txn20->txn19, T1->todo=<empty>) 4. T2 dies, T2->todo cleanup attempts to send failed reply for txn19, but T1->transaction_stack points to txn20 -- assertion failes Step 2. is the incorrect behavior. When there is a transaction on a thread's todo list, this thread should not be able to send any outgoing synchronous transactions. Only the head of the todo list needs to be checked because only threads that are waiting for proc work can directly receive work from another thread, and no work is allowed to be queued on such a thread without waking up the thread. This patch also enforces that a thread is not waiting for proc work when a work is directly enqueued to its todo list. Acked-by: Arve Hjønnevåg <arve@android.com> Signed-off-by: Sherry Yang <sherryy@android.com> Reviewed-by: Martijn Coenen <maco@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/Kconfig')
0 files changed, 0 insertions, 0 deletions