mirror of
https://github.com/brain-hackers/linux-brain.git
synced 2024-06-09 07:16:21 +09:00
binder: add missing binder_unlock()
When commit4be5a28104
("binder: check for binder_thread allocation failure in binder_poll()") was applied to 4.4-stable and 4.9-stable it was forgotten to release the global binder lock in the new error path. The global binder lock wasn't removed until v4.14, by commita60b890f60
("binder: remove global binder lock"). Fix the new error path to release the lock. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
2938d3b274
commit
bf5a6a7256
|
@ -2622,8 +2622,10 @@ static unsigned int binder_poll(struct file *filp,
|
|||
binder_lock(__func__);
|
||||
|
||||
thread = binder_get_thread(proc);
|
||||
if (!thread)
|
||||
if (!thread) {
|
||||
binder_unlock(__func__);
|
||||
return POLLERR;
|
||||
}
|
||||
|
||||
wait_for_proc_work = thread->transaction_stack == NULL &&
|
||||
list_empty(&thread->todo) && thread->return_error == BR_OK;
|
||||
|
|
Loading…
Reference in New Issue
Block a user