From: Greg Kroah-Hartman Date: Mon, 26 Feb 2018 19:37:53 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v3.18.97~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4024d2bf2e47439168fcc45b2189f9207d2d273c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: binder-add-missing-binder_unlock.patch --- diff --git a/queue-4.9/binder-add-missing-binder_unlock.patch b/queue-4.9/binder-add-missing-binder_unlock.patch new file mode 100644 index 00000000000..22f2fed2eca --- /dev/null +++ b/queue-4.9/binder-add-missing-binder_unlock.patch @@ -0,0 +1,40 @@ +From ebiggers3@gmail.com Mon Feb 26 20:36:21 2018 +From: Eric Biggers +Date: Mon, 26 Feb 2018 10:56:45 -0800 +Subject: binder: add missing binder_unlock() +To: stable@vger.kernel.org, Greg Kroah-Hartman +Cc: Guenter Roeck , Todd Kjos , Eric Biggers +Message-ID: <20180226185645.241652-1-ebiggers3@gmail.com> + + +From: Eric Biggers + +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 +Signed-off-by: Greg Kroah-Hartman +--- + drivers/android/binder.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/android/binder.c ++++ b/drivers/android/binder.c +@@ -2628,8 +2628,10 @@ static unsigned int binder_poll(struct f + 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; diff --git a/queue-4.9/series b/queue-4.9/series index 2966983dc9e..32455d7c67b 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -24,3 +24,4 @@ drm-amdgpu-add-dpm-quirk-for-jet-pro-v2.patch drm-amdgpu-add-atpx-quirk-handling-v2.patch drm-amdgpu-avoid-leaking-pm-domain-on-driver-unbind-v2.patch drm-amdgpu-add-new-device-to-use-atpx-quirk.patch +binder-add-missing-binder_unlock.patch