android_kernel_motorola_sm6375/drivers/android
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Todd Kjos a151ec4843 FROMGIT: binder: make sure fd closes complete
During BC_FREE_BUFFER processing, the BINDER_TYPE_FDA object
cleanup may close 1 or more fds. The close operations are
completed using the task work mechanism -- which means the thread
needs to return to userspace or the file object may never be
dereferenced -- which can lead to hung processes.

Force the binder thread back to userspace if an fd is closed during
BC_FREE_BUFFER handling.

Fixes: 80cd795630 ("binder: fix use-after-free due to ksys_close() during fdget()")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Martijn Coenen <maco@android.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20210830195146.587206-1-tkjos@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 111997867
(cherry picked from commit 5fdb55c1ac9585eb23bb2541d5819224429e103d
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
Change-Id: Idffa9b54edfc289d95b24f7ae2aa11ae494c7158
2021-09-15 09:29:22 -07:00
..
binder.c FROMGIT: binder: make sure fd closes complete 2021-09-15 09:29:22 -07:00
binder_alloc.c This is the 5.4.86 stable release 2020-12-30 12:31:14 +01:00
binder_alloc.h This is the 5.4.86 stable release 2020-12-30 12:31:14 +01:00
binder_alloc_selftest.c FROMGIT: binder: print warnings when detecting oneway spamming. 2020-09-10 15:52:35 +00:00
binder_internal.h BACKPORT: binder: move structs from core file to header file 2021-03-10 01:58:04 +00:00
binder_trace.h
binderfs.c binderfs: use refcount for binder control devices too 2020-03-25 08:25:50 +01:00
Kconfig ANDROID: add support for vendor hooks 2020-07-09 15:26:29 +02:00
Makefile ANDROID: add support for vendor hooks 2020-07-09 15:26:29 +02:00
vendor_hooks.c ANDROID: Add vendor hooks when syscall prctl finished 2021-03-09 21:57:07 +00:00