summaryrefslogtreecommitdiffstats
path: root/drivers/android/binder.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-06-06 02:14:03 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-06-06 02:14:03 +0200
commit6684cf42906ff5f44580e16a1f898e89c19aabd5 (patch)
treeb0370221df3a99967a42455610365043deb36d0b /drivers/android/binder.c
parentMerge tag 'mm-hotfixes-stable-2022-06-05' of git://git.kernel.org/pub/scm/lin... (diff)
parentfix the breakage in close_fd_get_file() calling conventions change (diff)
downloadlinux-6684cf42906ff5f44580e16a1f898e89c19aabd5.tar.xz
linux-6684cf42906ff5f44580e16a1f898e89c19aabd5.zip
Merge tag 'pull-work.fd-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull file descriptor fix from Al Viro: "Fix for breakage in #work.fd this window" * tag 'pull-work.fd-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix the breakage in close_fd_get_file() calling conventions change
Diffstat (limited to 'drivers/android/binder.c')
-rw-r--r--drivers/android/binder.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index 9e0982289dde..362c0deb65f1 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -1886,6 +1886,8 @@ static void binder_deferred_fd_close(int fd)
init_task_work(&twcb->twork, binder_do_fd_close);
twcb->file = close_fd_get_file(fd);
if (twcb->file) {
+ // pin it until binder_do_fd_close(); see comments there
+ get_file(twcb->file);
filp_close(twcb->file, current->files);
task_work_add(current, &twcb->twork, TWA_RESUME);
} else {