diff --git a/kernel-module/xt_RTPENGINE.c b/kernel-module/xt_RTPENGINE.c index 9af7f99ac..cb75a9162 100644 --- a/kernel-module/xt_RTPENGINE.c +++ b/kernel-module/xt_RTPENGINE.c @@ -1822,7 +1822,13 @@ static const struct vm_operations_struct vm_mmap_ops = { static void *shm_map_resolve(void *p, size_t size) { struct vm_area_struct *vma; // XXX is there a better way to map this to the kernel address? +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,14,0) vma = vma_lookup(current->mm, (unsigned long) p); +#else + vma = find_vma(current->mm, (unsigned long) p); + if (vma && (unsigned long) p < vma->vm_start) + vma = NULL; +#endif if (!vma) return NULL; if (!vma->vm_private_data)