summarylogtreecommitdiffstats
path: root/vmmon.patch
diff options
context:
space:
mode:
authorJean-Marc Lenoir2023-03-19 14:24:59 +0100
committerJean-Marc Lenoir2023-03-19 14:24:59 +0100
commita3cec4e4b258ec334f330cbae173e676c40c616e (patch)
tree586fb0c889727296835707f153e0410681032c8b /vmmon.patch
parenteb329dd2b333c893551601d8b910d89a2f5b4df6 (diff)
downloadaur-a3cec4e4b258ec334f330cbae173e676c40c616e.tar.gz
Fix a potential crash when loading vmnet module
Fix compilation with Linux 6.3-rc2
Diffstat (limited to 'vmmon.patch')
-rw-r--r--vmmon.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/vmmon.patch b/vmmon.patch
index 08806a4eec67..210cc9d56149 100644
--- a/vmmon.patch
+++ b/vmmon.patch
@@ -1073,6 +1073,18 @@
VMLinux *vmLinux = (VMLinux *) vma->vm_file->private_data;
unsigned long pg;
struct page* page;
+@@ -1106,7 +1071,11 @@ LinuxDriverMmap(struct file *filp,
+ return err;
+ }
+ /* Clear VM_IO, otherwise SuSE's kernels refuse to do get_user_pages */
++#if COMPAT_LINUX_VERSION_CHECK_LT(6, 3, 0)
+ vma->vm_flags &= ~VM_IO;
++#else
++ vm_flags_clear(vma, VM_IO);
++#endif
+
+ return 0;
+ }
@@ -1398,7 +1363,6 @@ LinuxDriver_Ioctl(struct inode *inode,
case IOCTL_VMX86_CREATE_VM:
case IOCTL_VMX86_INIT_CROSSGDT: