Advertisement
xme

VMware vmhgfs patch for Kali 1.1 / Kernel 3.18.0

xme
Feb 11th, 2015
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.06 KB | None | 0 0
  1. After the upgrade to Kali 1.1 (running kernel 3.18.0), the vmhgfs module (used to share folders) failed to compile. My environment:
  2. VMware Fusion: 7.1.0 (build-2314774)
  3. VMware Tools: 9.9.0.41534 (build-2304977)
  4.  
  5. Here is a quick patch to solve this issue waiting for the VMware fix.
  6. Files are located in /usr/lib/vmware-tools/modules/source/vmhgfs.tar
  7.  
  8. root@kali:/tmp# diff -ru vmhgfs-only vmhgfs-only.new
  9. diff -ru vmhgfs-only/inode.c vmhgfs-only.new/inode.c
  10. --- vmhgfs-only/inode.c 2014-11-18 03:07:13.000000000 +0100
  11. +++ vmhgfs-only.new/inode.c 2015-02-11 14:56:37.540363291 +0100
  12. @@ -1922,7 +1922,7 @@
  13.                             p,
  14.  #endif
  15.                             &inode->i_dentry,
  16. -                           d_alias) {
  17. +                           d_u.d_alias) {
  18.           int dcount = hgfs_d_count(dentry);
  19.           if (dcount) {
  20.              LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
  21. @@ -1975,7 +1975,7 @@
  22.        /* Find a dentry with valid d_count. Refer bug 587879. */
  23.        list_for_each(pos, &inode->i_dentry) {
  24.           int dcount;
  25. -         struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
  26. +         struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
  27.           dcount = hgfs_d_count(dentry);
  28.           if (dcount) {
  29.              LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
  30. diff -ru vmhgfs-only/page.c vmhgfs-only.new/page.c
  31. --- vmhgfs-only/page.c  2014-11-18 03:07:13.000000000 +0100
  32. +++ vmhgfs-only.new/page.c  2015-02-11 15:02:35.732378677 +0100
  33. @@ -1678,9 +1678,18 @@
  34.        LOG(6, (KERN_WARNING "VMware Hgfs: %s: Invalid unlock attempted\n", __func__));
  35.        return;
  36.     }
  37. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
  38.     smp_mb__before_clear_bit();
  39. +#else
  40. +   smp_mb__before_atomic();
  41. +#endif
  42.     clear_bit(PG_BUSY, &req->wb_flags);
  43. +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
  44.     smp_mb__after_clear_bit();
  45. +#else
  46. +   smp_mb__after_atomic();
  47. +#endif
  48. +
  49.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
  50.     wake_up_bit(&req->wb_flags, PG_BUSY);
  51.  #else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement