Merge branch 'fix_vm_set_flag' into 'stable-1.5'

Fix setting flag in vm_area_struct for Kernel 6.3

See merge request etherlab.org/ethercat!67
This commit is contained in:
Andreas Stewering-Bone 2023-06-01 05:53:32 +00:00
commit 04f202a39c
1 changed files with 4 additions and 0 deletions

View File

@ -243,7 +243,11 @@ int eccdev_mmap(
EC_MASTER_DBG(priv->cdev->master, 1, "mmap()\n");
vma->vm_ops = &eccdev_vm_ops;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
vm_flags_set(vma, VM_DONTDUMP);
#else
vma->vm_flags |= VM_DONTDUMP; /* Pages will not be swapped out */
#endif
vma->vm_private_data = priv;
return 0;