linux/drivers/android
Todd Kjos ccae6f6760 binder: avoid race conditions when enqueuing txn
Currently, the transaction complete work item is queued
after the transaction. This means that it is possible
for the transaction to be handled and a reply to be
enqueued in the current thread before the transaction
complete is enqueued, which violates the protocol
with userspace who may not expect the transaction
complete. Fixed by always enqueing the transaction
complete first.

Also, once the transaction is enqueued, it is unsafe
to access since it might be freed. Currently,
t->flags is accessed to determine whether a sync
wake is needed. Changed to access tr->flags
instead.

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-17 14:47:29 +02:00
..
binder_alloc.c binder: add log information for binder transaction failures 2017-07-17 14:47:29 +02:00
binder_alloc.h binder: move binder_alloc to separate file 2017-07-17 14:47:29 +02:00
binder_trace.h binder: separate out binder_alloc functions 2017-07-17 14:47:28 +02:00
binder.c binder: avoid race conditions when enqueuing txn 2017-07-17 14:47:29 +02:00
Kconfig binder: Add 'hwbinder' to the default devices 2017-03-17 15:10:49 +09:00
Makefile binder: move binder_alloc to separate file 2017-07-17 14:47:29 +02:00