Files
linux/drivers
Todd Kjos aa2c274c27 binder: make sure fd closes complete
commit 5fdb55c1ac upstream.

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>
2021-09-30 10:09:21 +02:00
..
2021-09-15 09:47:30 +02:00
2021-07-14 16:53:42 +02:00
2021-09-15 09:47:36 +02:00
2021-07-14 16:53:13 +02:00
2021-08-26 08:36:17 -04:00
2021-09-26 14:07:14 +02:00
2021-09-26 14:07:05 +02:00