diff --git a/binder/binder.c b/binder/binder.c index d3829a0..fce74a1 100644 --- a/binder/binder.c +++ b/binder/binder.c @@ -464,7 +464,11 @@ static long task_close_fd(struct binder_proc *proc, unsigned int fd) if (proc->files == NULL) return -ESRCH; +#if defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= 2055 + retval = close_fd(fd); +#else retval = __close_fd(proc->files, fd); +#endif /* can't restart close syscall because file table entry was cleared */ if (unlikely(retval == -ERESTARTSYS || retval == -ERESTARTNOINTR || @@ -3391,7 +3395,7 @@ static void binder_vma_close(struct vm_area_struct *vma) binder_defer_work(proc, BINDER_DEFERRED_PUT_FILES); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0) || ( defined(RHEL_RELEASE_CODE) && RHEL_RELEASE_CODE >= 2055 ) static vm_fault_t binder_vm_fault(struct vm_fault *vmf) #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) static int binder_vm_fault(struct vm_fault *vmf)