From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:32968 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751550AbeBZThJ (ORCPT ); Mon, 26 Feb 2018 14:37:09 -0500 Date: Mon, 26 Feb 2018 20:37:09 +0100 From: Greg Kroah-Hartman To: Eric Biggers Cc: stable@vger.kernel.org, Guenter Roeck , Todd Kjos , Eric Biggers Subject: Re: [PATCH 4.4,4.9] binder: add missing binder_unlock() Message-ID: <20180226193709.GC21453@kroah.com> References: <20180226185645.241652-1-ebiggers3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180226185645.241652-1-ebiggers3@gmail.com> Sender: stable-owner@vger.kernel.org List-ID: On Mon, Feb 26, 2018 at 10:56:45AM -0800, Eric Biggers wrote: > From: Eric Biggers > > [Please apply to 4.4-stable and 4.9-stable.] > > 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 > Signed-off-by: Eric Biggers > --- > drivers/android/binder.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > 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; > -- > 2.16.1.291.g4437f3f132-goog Thanks for the patch, all now queued up. greg k-h