Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created January 18, 2017 12:22
Show Gist options
  • Save rkitover/3c524cfe7c81a4a0bee286acd15f3714 to your computer and use it in GitHub Desktop.
Save rkitover/3c524cfe7c81a4a0bee286acd15f3714 to your computer and use it in GitHub Desktop.
patch for parallels tools for kernel 4.9.x
diff -ruN orig/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c new/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
--- orig/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2016-11-15 02:37:25.000000000 -0800
+++ new/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2017-01-18 02:18:08.000000000 -0800
@@ -383,7 +383,7 @@
}
static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
- struct inode *new_dir, struct dentry *new_de)
+ struct inode *new_dir, struct dentry *new_de, unsigned int dummy)
{
void *np, *nbuf;
int nbuflen;
diff -ruN orig/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c new/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
--- orig/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c 2016-11-15 02:37:25.000000000 -0800
+++ new/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c 2017-01-18 04:12:59.589410907 -0800
@@ -478,10 +478,17 @@
down_read(&current->mm->mmap_sem);
/* lock userspace pages */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
+ got = get_user_pages(
+ sbuf->u.Va, npages,
+ sbuf->Writable ? FOLL_WRITE : 0,
+ uple->p, NULL);
+#else
got = get_user_pages(
sbuf->u.Va, npages,
sbuf->Writable, 0,
uple->p, NULL);
+#endif
up_read(&current->mm->mmap_sem);
if (got < npages)
@jftoupet
Copy link

jftoupet commented Jul 6, 2017

Have you @jpcofr find a solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment