summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCody P Schafer2017-01-30 12:25:29 -0500
committerCody P Schafer2017-01-30 13:06:10 -0500
commitb020311fe8557d16ac3de1a78ec0cac298174da1 (patch)
tree3446e884717b548d67bb3568c4fe1832c9f0f291
parentb6bf0da42c223a1f33e5850f0912515e9d22d811 (diff)
downloadaur-b020311fe8557d16ac3de1a78ec0cac298174da1.tar.gz
dkms: fix 4.9
-rw-r--r--.SRCINFO4
-rw-r--r--0001-fix-for-4.9.y.patch81
-rw-r--r--PKGBUILD10
3 files changed, 92 insertions, 3 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b3d6b8b7dd0..fb3b3dd471b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = parallels-tools
pkgdesc = Parallels virtualization integration services & drivers
pkgver = 11.2.2.32651
- pkgrel = 2
+ pkgrel = 3
url = https://parallels.com
arch = x86_64
license = custom: commercial
@@ -25,6 +25,7 @@ pkgbase = parallels-tools
source = dir://parallels-tools/installer/prl-x11.sh
source = dir://parallels-tools/installer/prl-x11.service
source = dir://parallels-tools/installer/prlfsmountd.sh
+ source = 0001-fix-for-4.9.y.patch
sha1sums = af32269e60b11704be9fca73ea9586da01b37ae2
sha1sums = 604bcee0d5c9ac6a347c6ce40792ddc7598f99dd
sha1sums = 8d7b264653f8167904d0328e1fc540fc0b7bc7eb
@@ -37,6 +38,7 @@ pkgbase = parallels-tools
sha1sums = 82ab36a2876a1d30fad92ebf06d87b0d8d7210a8
sha1sums = bd681d740b4a1a68adfd4f94afec5934c2ea69ac
sha1sums = 56d3fc7c9abb7c63b9c6356422261f0a87cf3b22
+ sha1sums = dca57db6826f044d23fc26c0df3736a5dfb9ae6d
pkgname = parallels-tools
diff --git a/0001-fix-for-4.9.y.patch b/0001-fix-for-4.9.y.patch
new file mode 100644
index 00000000000..58df4eeacc3
--- /dev/null
+++ b/0001-fix-for-4.9.y.patch
@@ -0,0 +1,81 @@
+From 8695b6d330e237f5e21bef576d0ba3e49832b6fe Mon Sep 17 00:00:00 2001
+From: Cody P Schafer <dev@codyps.com>
+Date: Mon, 30 Jan 2017 12:22:26 -0500
+Subject: [PATCH] fix for 4.9.y
+
+---
+ prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c | 12 ++++++++++++
+ prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c | 2 +-
+ prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h | 10 ++++++++--
+ 3 files changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
+index 5502d70..e8d0043 100644
+--- a/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
++++ b/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c
+@@ -382,11 +382,22 @@ static int prlfs_rmdir(struct inode *dir, struct dentry *dentry)
+ return ret;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
+ static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
+ struct inode *new_dir, struct dentry *new_de)
++#else
++static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
++ struct inode *new_dir, struct dentry *new_de, unsigned int flags)
++#endif
+ {
+ void *np, *nbuf;
+ int nbuflen;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
++ if (flags)
++ return -EINVAL;
++#endif
++
++ {
+ PRLFS_STD_INODE_HEAD(old_de)
+ nbuflen = PATH_MAX;
+ nbuf = kmalloc(nbuflen, GFP_KERNEL);
+@@ -406,6 +417,7 @@ static int prlfs_rename(struct inode *old_dir, struct dentry *old_de,
+ out_free1:
+ kfree(nbuf);
+ PRLFS_STD_INODE_TAIL
++ }
+ }
+
+ /*
+diff --git a/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c b/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
+index a03e742..9f54ec1 100644
+--- a/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
++++ b/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg.c
+@@ -480,7 +480,7 @@ static TG_PAGED_BUFFER *map_user_request(TG_PAGED_BUFFER *buf, TG_BUFFER *sbuf,
+ /* lock userspace pages */
+ got = get_user_pages(
+ sbuf->u.Va, npages,
+- sbuf->Writable, 0,
++ sbuf->Writable ? FOLL_WRITE : 0,
+ uple->p, NULL);
+ up_read(&current->mm->mmap_sem);
+
+diff --git a/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h b/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h
+index c158a70..37044b4 100644
+--- a/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h
++++ b/prl_tg/Toolgate/Guest/Linux/prl_tg/prltg_compat.h
+@@ -193,6 +193,12 @@ prltg_proc_create_data(char *name, umode_t mode, struct proc_dir_entry *parent,
+ #define page_cache_get(x) get_page(x)
+ #define page_cache_release(x) put_page(x)
+ #else
+-#define get_user_pages(_1, _2, _3, _4, _5, _6) \
+- get_user_pages(current, current->mm, _1, _2, _3, _4, _5, _6)
++#endif
++
++# if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
++#define get_user_pages(_start, _nr_pages, _gup_flags, _pages, _vmas) \
++ get_user_pages(current, current->mm, _start, _nr_pages, !!(_gup_flags & FOLL_WRITE), !!(_gup_flags & FOLL_FORCE), _pages, _vmas)
++# elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)
++# define get_user_pages(_start, _nr_pages, _gup_flags, _pages, _vmas) \
++ get_user_pages(_start, _nr_pages, !!(_gup_flags & FOLL_WRITE), !!(_gup_flags & FOLL_FORCE), _pages, _vmas)
+ #endif
+--
+2.11.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 902dffc65b3..96963bc5d2d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgbase=parallels-tools
pkgname=(parallels-tools parallels-tools-dkms)
pkgver=11.2.2.32651
-pkgrel=2
+pkgrel=3
pkgdesc="Parallels virtualization integration services & drivers"
arch=('x86_64')
url="https://parallels.com"
@@ -32,6 +32,7 @@ source=(
dir://parallels-tools/installer/prl-x11.sh
dir://parallels-tools/installer/prl-x11.service
dir://parallels-tools/installer/prlfsmountd.sh
+ '0001-fix-for-4.9.y.patch'
)
sha1sums=('af32269e60b11704be9fca73ea9586da01b37ae2'
@@ -45,7 +46,12 @@ sha1sums=('af32269e60b11704be9fca73ea9586da01b37ae2'
'c50bf939719eba4ebb34e4bd8a0921e1cbe4d901'
'82ab36a2876a1d30fad92ebf06d87b0d8d7210a8'
'bd681d740b4a1a68adfd4f94afec5934c2ea69ac'
- '56d3fc7c9abb7c63b9c6356422261f0a87cf3b22')
+ '56d3fc7c9abb7c63b9c6356422261f0a87cf3b22'
+ 'dca57db6826f044d23fc26c0df3736a5dfb9ae6d')
+
+prepare() {
+ patch -p1 -i ../0001-fix-for-4.9.y.patch
+}
package_parallels-tools() {
cp -r "${srcdir}"/xorg.${XORG_VERSION}/usr "${pkgdir}"