summaryrefslogtreecommitdiff
path: root/drivers/android
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2018-02-26 10:56:45 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-28 10:18:33 +0100
commitfebf108e6c82d981ac6306978129dccb75db8b64 (patch)
treec8b76b4ceb6368d07d655b91bd660fc182e0ab79 /drivers/android
parent65aeceb58fe4e49dc1e4a581296e21cc5186ce6d (diff)
binder: add missing binder_unlock()
When commit 4be5a2810489 ("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 commit a60b890f607d ("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>
Diffstat (limited to 'drivers/android')
-rw-r--r--drivers/android/binder.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 3b6ac80b2127..49199bd2ab93 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -2628,8 +2628,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;