aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartijn Coenen <maco@android.com>2017-08-14 23:11:14 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-08-14 23:11:14 +0000
commit8a0093840dee3c36e4487b9617683495761eab2c (patch)
tree3633ec11f8f3ae05e87ed063a88ada5a344d6152
parent7789115e1738470cf032254a8dfd21ba05009806 (diff)
parente60b7518b89e94de8312df0609110131b36761f3 (diff)
downloadv4.4-8a0093840dee3c36e4487b9617683495761eab2c.tar.gz
ANDROID: binder: don't enqueue death notifications to thread todo. am: c825eca5ec
am: e60b7518b8 Change-Id: Ic3df06e7742f78e19aa8a9d1ca37af36bf1eb095
-rw-r--r--drivers/android/binder.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index ea718f2995d5..061a7258779e 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3670,22 +3670,12 @@ static int binder_thread_write(struct binder_proc *proc,
ref->death = death;
if (ref->node->proc == NULL) {
ref->death->work.type = BINDER_WORK_DEAD_BINDER;
- if (thread->looper &
- (BINDER_LOOPER_STATE_REGISTERED |
- BINDER_LOOPER_STATE_ENTERED))
- binder_enqueue_work(
- proc,
- &ref->death->work,
- &thread->todo);
- else {
- binder_inner_proc_lock(proc);
- binder_enqueue_work_ilocked(
- &ref->death->work,
- &proc->todo);
- binder_wakeup_proc_ilocked(
- proc);
- binder_inner_proc_unlock(proc);
- }
+
+ binder_inner_proc_lock(proc);
+ binder_enqueue_work_ilocked(
+ &ref->death->work, &proc->todo);
+ binder_wakeup_proc_ilocked(proc);
+ binder_inner_proc_unlock(proc);
}
} else {
if (ref->death == NULL) {