binder: guarantee txn complete / errors delivered in-order
authorTodd Kjos <tkjos@android.com>
Thu, 29 Jun 2017 19:01:55 +0000 (12:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 12:47:30 +0000 (14:47 +0200)
commit26549d17741035b604048770f354c8c6b5e25ac9
treeb29a70c42aca49c7b70ee3b9d35623380da6228d
parentb6d282cea3f3ed3a5b09d687443213547db39499
binder: guarantee txn complete / errors delivered in-order

Since errors are tracked in the return_error/return_error2
fields of the binder_thread object and BR_TRANSACTION_COMPLETEs
can be tracked either in those fields or via the thread todo
work list, it is possible for errors to be reported ahead
of the associated txn complete.

Use the thread todo work list for errors to guarantee
order. Also changed binder_send_failed_reply to pop
the transaction even if it failed to send a reply.

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c