Used yum to update to the latest kernel this morning, which forced a rebuild of VMWare Workstation 11.1.0 build-2496824
The build failed, however, with complaints such as:
Code:
/tmp/modconfig-1Xsnv4/vmnet-only/driver.c:1194:20: error: ‘struct file’ has no member named ‘f_dentry’
if (filp && filp->f_dentry) {
^
According to the link below (contains comments and solutions) the problem is specific to 3.19.
https://communities.vmware.com/message/2469395
The "easy" solution references https://wiki.archlinux.org/index.php/VMware, which contains step by step instructions, which worked for me. I will recreate the text here in case the site goes down.
Code:
$ curl http://pastie.org/pastes/9934018/download -o /tmp/vmnet-3.19.patch
Extract the vmnet module sources:
Code:
$ cd /usr/lib/vmware/modules/source
# tar -xf vmnet.tar
Apply the patch:
Code:
# patch -p0 -i /tmp/vmnet-3.19.patch
Recreate the archive:
Code:
# tar -cf vmnet.tar vmnet-only
Remove leftover:
OK, I was root when I did this, and I used the following, but it is a brutal command so use it wisely and do not mistype anything.
Code:
# /bin/rm -rf *-only
Rebuild modules:
Code:
# vmware-modconfig --console --install-all
Done, and now it works just great.
Hope this helps someone. I always break out in a cold sweat when I need to do this.
For the curious, this is what the patch contains:
Code:
diff -ur vmnet-only.a/driver.c vmnet-only/driver.c
--- vmnet-only.a/driver.c 2014-11-20 20:13:56.000000000 -0500
+++ vmnet-only/driver.c 2015-02-09 15:40:10.916640592 -0500
@@ -265,10 +265,17 @@
{
int ret = -ENOTTY;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
ret = VNetFileOpIoctl(filp->f_dentry->d_inode, filp, iocmd, ioarg);
}
return ret;
+#else
+ if (filp && filp->f_op && filp->f_op->ioctl == VNetFileOpIoctl) {
+ ret = VNetFileOpIoctl(filp->f_path.dentry->d_inode, filp, iocmd, ioarg);
+ }
+ return ret;
+#endif
}
@@ -1191,11 +1198,19 @@
struct inode *inode = NULL;
long err;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
if (filp && filp->f_dentry) {
inode = filp->f_dentry->d_inode;
}
err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
return err;
+#else
+ if (filp && filp->f_path.dentry) {
+ inode = filp->f_path.dentry->d_inode;
+ }
+ err = VNetFileOpIoctl(inode, filp, iocmd, ioarg);
+ return err;
+#endif
}
#endif
diff -ur vmnet-only.a/userif.c vmnet-only/userif.c
--- vmnet-only.a/userif.c 2014-11-20 20:13:56.000000000 -0500
+++ vmnet-only/userif.c 2015-02-09 15:41:02.150847338 -0500
@@ -523,7 +523,13 @@
.iov_base = buf,
.iov_len = len,
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0)
return skb_copy_datagram_iovec(skb, 0, &iov, len);
+#else
+ struct iov_iter to;
+ iov_iter_init(&to, READ, &iov, 1, len);
+ return skb_copy_datagram_iter(skb, 0, &to, len);
+#endif
}