]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Feb 2018 19:36:51 +0000 (20:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Feb 2018 19:36:51 +0000 (20:36 +0100)
added patches:
binder-add-missing-binder_unlock.patch

queue-4.4/binder-add-missing-binder_unlock.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/binder-add-missing-binder_unlock.patch b/queue-4.4/binder-add-missing-binder_unlock.patch
new file mode 100644 (file)
index 0000000..50df454
--- /dev/null
@@ -0,0 +1,40 @@
+From ebiggers3@gmail.com  Mon Feb 26 20:36:21 2018
+From: Eric Biggers <ebiggers3@gmail.com>
+Date: Mon, 26 Feb 2018 10:56:45 -0800
+Subject: binder: add missing binder_unlock()
+To: stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Guenter Roeck <linux@roeck-us.net>, Todd Kjos <tkjos@android.com>, Eric Biggers <ebiggers@google.com>
+Message-ID: <20180226185645.241652-1-ebiggers3@gmail.com>
+
+
+From: Eric Biggers <ebiggers@google.com>
+
+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>
+---
+ drivers/android/binder.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/android/binder.c
++++ b/drivers/android/binder.c
+@@ -2622,8 +2622,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;
index 79ca014615d9117bfc8258087b35513b374b1049..f7871c130b539d1ddf070768c13edb85ed55b1cc 100644 (file)
@@ -19,3 +19,4 @@ usb-ldusb-add-pids-for-new-cassy-devices-supported-by-this-driver.patch
 usb-gadget-f_fs-process-all-descriptors-during-bind.patch
 usb-renesas_usbhs-missed-the-running-flag-in-usb_dmac-with-rx-path.patch
 drm-amdgpu-avoid-leaking-pm-domain-on-driver-unbind-v2.patch
+binder-add-missing-binder_unlock.patch