1
0
Fork 0
alistair23-linux/drivers/android
Todd Kjos 26b47d8a16 binder: refactor queue management in binder_thread_read
In binder_thread_read, the BINDER_WORK_NODE command is used
to communicate the references on the node to userspace. It
can take a couple of iterations in the loop to construct
the list of commands for user space. When locking is added,
the lock would need to be release on each iteration which
means the state could change. The work item is not dequeued
during this process which prevents a simpler queue management
that can just dequeue up front and handle the work item.

Fixed by changing the BINDER_WORK_NODE algorithm in
binder_thread_read to determine which commands to send
to userspace atomically in 1 pass so it stays consistent
with the kernel view.

The work item is now dequeued immediately since only
1 pass is needed.

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
..
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
binder.c binder: refactor queue management in binder_thread_read 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