forked from pool/virtualbox
d1039d5c96
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=324
28 lines
1.6 KiB
Diff
28 lines
1.6 KiB
Diff
Index: VirtualBox-5.1.18/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
|
===================================================================
|
|
--- VirtualBox-5.1.18.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
|
+++ VirtualBox-5.1.18/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
|
@@ -1084,18 +1079,14 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
|
|
# endif
|
|
);
|
|
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) */
|
|
- rc = get_user_pages(pTask, /* Task for fault accounting. */
|
|
- pTask->mm, /* Whose pages. */
|
|
- R3Ptr, /* Where from. */
|
|
+ /* The following is modified for Leap 42.3 having the
|
|
+ * get_user_pages() API from kernel 4.10
|
|
+ */
|
|
+ rc = get_user_pages(R3Ptr, /* Where from. */
|
|
cPages, /* How many pages. */
|
|
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
fWrite ? FOLL_WRITE | /* Write to memory. */
|
|
FOLL_FORCE /* force write access. */
|
|
: 0, /* Write to memory. */
|
|
-# else
|
|
- fWrite, /* Write to memory. */
|
|
- fWrite, /* force write access. */
|
|
-# endif
|
|
&pMemLnx->apPages[0], /* Page array. */
|
|
papVMAs); /* vmas */
|
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) */
|