rgadsdon
Enthusiast
Enthusiast

Linux host - Kernel 3.19 breaks VMware (vmnet)

Tried VMware Workstation 11.0 with Kernel 3.19-rc3) and VMware vmnet compile fails:

/tmp/modconfig-2fqpf2/vmnet-only/driver.c:1194:20: error: ‘struct file’ has no member named ‘f_dentry’


Replaced ‘f_dentry’ by ‘f_path.dentry’… and driver.c compiled ok, but then:

/tmp/modconfig-dy2ali/vmnet-only/userif.c:526:4: error: implicit declaration of function ‘skb_copy_datagram_iovec’ [-Werror=implicit-function-declaration]


I tried more code changes (replacing skb_copy_datagram_iovec with skb_copy_datagram_msg in userif.c, and got vmnet to compile, but it crashed/tombstoned when starting up…

[ 854.004621] general protection fault: 0000 [#2] PREEMPT SMP

(more detail at http://rglinuxtech.com/?p=1267)

Robert Gadsdon

January 12, 2015

0 Kudos
11 Replies
coderus
Contributor
Contributor

Credits goes to Al Viro for solution.

replace

   return skb_copy_datagram_iovec(skb, 0, &iov, len);

with

   struct iov_iter to;

   iov_iter_init(&to, READ, &iov, 1, len);

   return skb_copy_datagram_iter(skb, 0, &to, len);

and everything compiled and working now Smiley Happy

0 Kudos
rgadsdon
Enthusiast
Enthusiast

Many thanks for this!    Applied the changes, and vmnet compiles and loads/runs OK, now..

RG.

0 Kudos
Roger_Bergling
Contributor
Contributor

I am trying to do the same thing.

But not working for me, what changes did you do ?

driver.c and userif.c or only userif ?

0 Kudos
rgadsdon
Enthusiast
Enthusiast

I have just posted more details of a backwards-compatible fix, here: http://rglinuxtech.com/?p=1281

RG.

0 Kudos
coderus
Contributor
Contributor

in kernel 3.19 also change around line 1194

   if (filp && filp->f_dentry) {

      inode = filp->f_dentry->d_inode;

   }

to

   inode = file_inode(filp);

instead of changing f_dentry to f_path.dentry

0 Kudos
Roger_Bergling
Contributor
Contributor

Thanx !

Works

3.19.0-031900rc5-generic

0 Kudos
mfelker
Expert
Expert

As a non-programmer I found the files and instructions very easy indeed at

https://wiki.archlinux.org/index.php/VMware

Works perfectly

0 Kudos
nomadlw
Contributor
Contributor

Dude. You saved me here.

A HUGE thanks your way!

0 Kudos
mforsyth
Contributor
Contributor

Patch described at at https://wiki.archlinux.org/index.php/VMware#3.19_kernels didn't quite work for me after upgrade to Ubuntu 15.04. I was still getting error associated with number of arguments to alloc_netdev, i.e. ....

/usr/lib/vmware/modules/source/vmnet-only/netif.c:152:64: error: macro "alloc_netdev" requires 4 arguments, but only 3 given

    dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);

The additional change described at Linux 3.17-rc compatibilityt , namely

from

   dev = alloc_netdev(sizeof *netIf, deviceName, VNetNetIfSetup);

 

to

   dev = alloc_netdev(sizeof *netIf, deviceName, NET_NAME_UNKNOWN, VNetNetIfSetup);

fixed it for me (running kernel 3.19.0-15-generic).

0 Kudos
kingneutron
Expert
Expert

--This bug bit me, downgrading now to kernel 3.16.

--Vmware needs to fix this ASAP, lots of people are still on Ubuntu 14.04-LTS and expect to be able to run the latest kernel with the latest Workstation 11...

./. If you have appreciated my response, please remember to apply Helpful/Correct points. TIA
0 Kudos
kingneutron
Expert
Expert

--Update - as of Vmware Workstation 11.1.2-2780323, I can confirm it works OK with Ubuntu 14.04-64-LTS kernel  3.19.0-21-generic #21~14.04.1-Ubuntu SMP -- they fixed the issue.

./. If you have appreciated my response, please remember to apply Helpful/Correct points. TIA
0 Kudos