diff --git a/binder/binder.c b/binder/binder.c index 8901fd2..a7e620b 100644 --- a/binder/binder.c +++ b/binder/binder.c @@ -2244,6 +2244,9 @@ static void binder_deferred_fd_close(int fd) __close_fd_get_file(fd, &twcb->file); #endif if (twcb->file) { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)) + get_file(twcb->file); +#endif filp_close(twcb->file, current->files); task_work_add(current, &twcb->twork, TWA_RESUME); } else { diff --git a/binder/deps.c b/binder/deps.c index a7c5763..319e82f 100644 --- a/binder/deps.c +++ b/binder/deps.c @@ -70,11 +70,12 @@ static unsigned long kallsyms_lookup_name_wrapper(const char *name) #endif } -static int (*close_fd_get_file_ptr)(unsigned int fd -#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)) - , struct file **res +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)) +static struct file *(*close_fd_get_file_ptr)(unsigned int fd) +#else +static int (*close_fd_get_file_ptr)(unsigned int fd, struct file **res) #endif - ) = NULL; + = NULL; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,19,0)) struct file *close_fd_get_file(unsigned int fd)