File vbox_fix_42.3_api.patch of Package virtualbox.openSUSE_Leap_42.2_Update

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) */
openSUSE Build Service is sponsored by