2016-11-21 23:50:08 +01:00
|
|
|
Index: VirtualBox-5.1.10/src/VBox/Additions/linux/sharedfolders/dirops.c
|
2016-10-20 15:52:35 +02:00
|
|
|
===================================================================
|
2016-11-21 23:50:08 +01:00
|
|
|
--- VirtualBox-5.1.10.orig/src/VBox/Additions/linux/sharedfolders/dirops.c
|
|
|
|
+++ VirtualBox-5.1.10/src/VBox/Additions/linux/sharedfolders/dirops.c
|
|
|
|
@@ -748,12 +748,18 @@ static int sf_rmdir(struct inode *parent
|
|
|
|
* @param flags flags
|
2016-10-20 15:52:35 +02:00
|
|
|
* @returns 0 on success, Linux error code otherwise
|
|
|
|
*/
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
|
|
|
static int sf_rename(struct inode *old_parent, struct dentry *old_dentry,
|
2016-11-21 23:50:08 +01:00
|
|
|
struct inode *new_parent, struct dentry *new_dentry
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
, unsigned flags
|
|
|
|
#endif
|
|
|
|
)
|
2016-10-20 15:52:35 +02:00
|
|
|
+#else
|
|
|
|
+static int sf_rename(struct inode *old_parent, struct dentry *old_dentry,
|
|
|
|
+ struct inode *new_parent, struct dentry *new_dentry,
|
|
|
|
+ unsigned int flags)
|
|
|
|
+#endif
|
|
|
|
{
|
|
|
|
int err = 0, rc = VINF_SUCCESS;
|
|
|
|
struct sf_glob_info *sf_g = GET_GLOB_INFO(old_parent->i_sb);
|
2016-11-21 23:50:08 +01:00
|
|
|
Index: VirtualBox-5.1.10/src/VBox/Additions/linux/drm/vbox_ttm.c
|
2016-10-21 04:07:42 +02:00
|
|
|
===================================================================
|
2016-11-21 23:50:08 +01:00
|
|
|
--- VirtualBox-5.1.10.orig/src/VBox/Additions/linux/drm/vbox_ttm.c
|
|
|
|
+++ VirtualBox-5.1.10/src/VBox/Additions/linux/drm/vbox_ttm.c
|
2016-10-21 04:07:42 +02:00
|
|
|
@@ -221,7 +221,8 @@ static int vbox_bo_move(struct ttm_buffe
|
|
|
|
struct ttm_mem_reg *new_mem)
|
|
|
|
{
|
|
|
|
int r;
|
|
|
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)
|
2016-10-21 18:06:09 +02:00
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) || \
|
2016-10-21 04:07:42 +02:00
|
|
|
+ LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
r = ttm_bo_move_memcpy(bo, evict, no_wait_gpu, new_mem);
|
2016-11-21 23:50:08 +01:00
|
|
|
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
|
2016-10-21 04:07:42 +02:00
|
|
|
r = ttm_bo_move_memcpy(bo, evict, interruptible, no_wait_gpu, new_mem);
|
2016-11-21 23:50:08 +01:00
|
|
|
Index: VirtualBox-5.1.10/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
2016-10-26 19:09:38 +02:00
|
|
|
===================================================================
|
2016-11-21 23:50:08 +01:00
|
|
|
--- VirtualBox-5.1.10.orig/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
|
|
|
+++ VirtualBox-5.1.10/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
|
2016-10-26 19:09:38 +02:00
|
|
|
@@ -1045,7 +1045,27 @@ DECLHIDDEN(int) rtR0MemObjNativeLockUser
|
|
|
|
/*
|
|
|
|
* Get user pages.
|
|
|
|
*/
|
|
|
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
|
|
|
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
|
|
|
|
+ if (R0Process == RTR0ProcHandleSelf())
|
|
|
|
+ rc = get_user_pages(R3Ptr, /* Where from. */
|
|
|
|
+ cPages, /* How many pages. */
|
|
|
|
+ fWrite, /* Write to memory. */
|
|
|
|
+ &pMemLnx->apPages[0], /* Page array. */
|
|
|
|
+ papVMAs); /* vmas */
|
|
|
|
+ /*
|
|
|
|
+ * Actually this should not happen at the moment as call this function
|
|
|
|
+ * only for our own process.
|
|
|
|
+ */
|
|
|
|
+ else
|
|
|
|
+ rc = get_user_pages_remote(
|
|
|
|
+ pTask, /* Task for fault accounting. */
|
|
|
|
+ pTask->mm, /* Whose pages. */
|
|
|
|
+ R3Ptr, /* Where from. */
|
|
|
|
+ cPages, /* How many pages. */
|
|
|
|
+ fWrite, /* Write to memory. */
|
|
|
|
+ &pMemLnx->apPages[0], /* Page array. */
|
|
|
|
+ papVMAs); /* vmas */
|
|
|
|
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)
|
|
|
|
if (R0Process == RTR0ProcHandleSelf())
|
|
|
|
rc = get_user_pages(R3Ptr, /* Where from. */
|
|
|
|
cPages, /* How many pages. */
|