Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- After the upgrade to Kali 1.1 (running kernel 3.18.0), the vmhgfs module (used to share folders) failed to compile. My environment:
- VMware Fusion: 7.1.0 (build-2314774)
- VMware Tools: 9.9.0.41534 (build-2304977)
- Here is a quick patch to solve this issue waiting for the VMware fix.
- Files are located in /usr/lib/vmware-tools/modules/source/vmhgfs.tar
- root@kali:/tmp# diff -ru vmhgfs-only vmhgfs-only.new
- diff -ru vmhgfs-only/inode.c vmhgfs-only.new/inode.c
- --- vmhgfs-only/inode.c 2014-11-18 03:07:13.000000000 +0100
- +++ vmhgfs-only.new/inode.c 2015-02-11 14:56:37.540363291 +0100
- @@ -1922,7 +1922,7 @@
- p,
- #endif
- &inode->i_dentry,
- - d_alias) {
- + d_u.d_alias) {
- int dcount = hgfs_d_count(dentry);
- if (dcount) {
- LOG(4, ("Found %s %d \n", dentry->d_name.name, dcount));
- @@ -1975,7 +1975,7 @@
- /* Find a dentry with valid d_count. Refer bug 587879. */
- list_for_each(pos, &inode->i_dentry) {
- int dcount;
- - struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
- + struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
- dcount = hgfs_d_count(dentry);
- if (dcount) {
- LOG(4, ("Found %s %d \n", (dentry)->d_name.name, dcount));
- diff -ru vmhgfs-only/page.c vmhgfs-only.new/page.c
- --- vmhgfs-only/page.c 2014-11-18 03:07:13.000000000 +0100
- +++ vmhgfs-only.new/page.c 2015-02-11 15:02:35.732378677 +0100
- @@ -1678,9 +1678,18 @@
- LOG(6, (KERN_WARNING "VMware Hgfs: %s: Invalid unlock attempted\n", __func__));
- return;
- }
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
- smp_mb__before_clear_bit();
- +#else
- + smp_mb__before_atomic();
- +#endif
- clear_bit(PG_BUSY, &req->wb_flags);
- +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
- smp_mb__after_clear_bit();
- +#else
- + smp_mb__after_atomic();
- +#endif
- +
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 13)
- wake_up_bit(&req->wb_flags, PG_BUSY);
- #else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement