From d1039d5c969635fe403f168d64d971dea1b4c68da89c4afaa0300e273f735a9e Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sun, 9 Apr 2017 00:13:39 +0000 Subject: [PATCH] - Add File "vbox_fix_42.3_api.patch" to handle the get_user_pages() API change in Leap 42.3. OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtualbox?expand=0&rev=324 --- vbox_fix_42.3_api.patch | 27 +++++++++++++++++++++++++++ virtualbox.changes | 5 +++++ virtualbox.spec | 5 +++++ 3 files changed, 37 insertions(+) create mode 100644 vbox_fix_42.3_api.patch diff --git a/vbox_fix_42.3_api.patch b/vbox_fix_42.3_api.patch new file mode 100644 index 0000000..be7d6f6 --- /dev/null +++ b/vbox_fix_42.3_api.patch @@ -0,0 +1,27 @@ +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) */ diff --git a/virtualbox.changes b/virtualbox.changes index b46448d..10c01b5 100644 --- a/virtualbox.changes +++ b/virtualbox.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Apr 8 23:10:36 UTC 2017 - Larry.Finger@lwfinger.net + +- Add File "vbox_fix_42.3_api.patch" to handle the get_user_pages() API change in Leap 42.3. + ------------------------------------------------------------------- Tue Mar 28 14:53:52 UTC 2017 - Larry.Finger@lwfinger.net diff --git a/virtualbox.spec b/virtualbox.spec index db16ef1..5d0fa41 100644 --- a/virtualbox.spec +++ b/virtualbox.spec @@ -90,6 +90,8 @@ Patch109: vbox-usb-warning.diff Patch112: modify_for_4_8_bo_move.patch # Remove all mention of _smp_mflags Patch113: vbox_remove_smp_mflags.patch +# Fix change in API for get_user_pages() +Patch114: vbox_fix_42.3_api.patch # Fix for missing include needed for server 1.19 Patch116: Fix_for_server_1.19.patch # @@ -333,6 +335,9 @@ This package contains icons for guest desktop files that were created on the des %patch109 -p1 %patch112 -p1 %patch113 -p1 +%if 0%{?sle_version} == 120300 +%patch114 -p1 +%endif %patch116 -p1 #copy user manual