]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/android/binder.c
binder: check for binder_thread allocation failure in binder_poll()
[linux.git] / drivers / android / binder.c
index 15e3d3c2260ddc915f49732f1076f3a7ee0f540e..ad5e662e3e149a1f83d7e250ef6bac4b5e224499 100644 (file)
@@ -4391,6 +4391,8 @@ static __poll_t binder_poll(struct file *filp,
        bool wait_for_proc_work;
 
        thread = binder_get_thread(proc);
+       if (!thread)
+               return POLLERR;
 
        binder_inner_proc_lock(thread->proc);
        thread->looper |= BINDER_LOOPER_STATE_POLL;