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>

authored by Martijn Coenen and committed by Greg Kroah-Hartman 66b83a4c 33d930e5

+1 -10
+1 -10
drivers/android/binder.c
··· 3662 } 3663 } 3664 3665 - static 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 - 3671 static int binder_put_node_cmd(struct binder_proc *proc, 3672 struct binder_thread *thread, 3673 void __user **ptrp, ··· 4291 4292 binder_inner_proc_unlock(thread->proc); 4293 4294 - if (binder_has_work(thread, wait_for_proc_work)) 4295 - return POLLIN; 4296 - 4297 poll_wait(filp, &thread->wait, wait); 4298 4299 - if (binder_has_thread_work(thread)) 4300 return POLLIN; 4301 4302 return 0;
··· 3662 } 3663 } 3664 3665 static int binder_put_node_cmd(struct binder_proc *proc, 3666 struct binder_thread *thread, 3667 void __user **ptrp, ··· 4297 4298 binder_inner_proc_unlock(thread->proc); 4299 4300 poll_wait(filp, &thread->wait, wait); 4301 4302 + if (binder_has_work(thread, wait_for_proc_work)) 4303 return POLLIN; 4304 4305 return 0;