aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/android/binder.c
diff options
context:
space:
mode:
authorMartijn Coenen <maco@android.com>2017-10-09 08:26:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-20 06:53:43 -0400
commit66b83a4cdd3b73effdc285d1d66763c69ffe2ee8 (patch)
tree4b5a6f1703ff3f9634e633dc58e6693cbb391463 /drivers/android/binder.c
parent33d930e59a98fa10a0db9f56c7fa2f21a4aef9b9 (diff)
binder: call poll_wait() unconditionally.
Because we're not guaranteed that subsequent calls to poll() will have a poll_table_struct parameter with _qproc set. When _qproc is not set, poll_wait() is a noop, and we won't be woken up correctly. Signed-off-by: Martijn Coenen <maco@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r--drivers/android/binder.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 0621a95b8597..fddf76ef5bd6 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3662,12 +3662,6 @@ static void binder_stat_br(struct binder_proc *proc,
3662 } 3662 }
3663} 3663}
3664 3664
3665static int binder_has_thread_work(struct binder_thread *thread)
3666{
3667 return !binder_worklist_empty(thread->proc, &thread->todo) ||
3668 thread->looper_need_return;
3669}
3670
3671static int binder_put_node_cmd(struct binder_proc *proc, 3665static int binder_put_node_cmd(struct binder_proc *proc,
3672 struct binder_thread *thread, 3666 struct binder_thread *thread,
3673 void __user **ptrp, 3667 void __user **ptrp,
@@ -4297,12 +4291,9 @@ static unsigned int binder_poll(struct file *filp,
4297 4291
4298 binder_inner_proc_unlock(thread->proc); 4292 binder_inner_proc_unlock(thread->proc);
4299 4293
4300 if (binder_has_work(thread, wait_for_proc_work))
4301 return POLLIN;
4302
4303 poll_wait(filp, &thread->wait, wait); 4294 poll_wait(filp, &thread->wait, wait);
4304 4295
4305 if (binder_has_thread_work(thread)) 4296 if (binder_has_work(thread, wait_for_proc_work))
4306 return POLLIN; 4297 return POLLIN;
4307 4298
4308 return 0; 4299 return 0;