Re: How to handle non-local renames?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> A: cd /mnt/a/b
> B: mv /mnt/a/b /mnt
> B: mv /mnt/a /mnt/b
> A: cd a

I think with this it's possible (though not easy) to deadlock NFS:

A: cd /mnt/a; sleep 10000 & cd b
B: mv /mnt/a/b /mnt/b
B: mv /mnt/a /mnt/b/a
A: mv /proc/`pidof sleep`/cwd/x x & rmdir /mnt/b/a

The mv will first lock a, then b (since it's CWD is /mnt/a/b, so
parents in the rename will be /mnt/a and /mnt/a/b), the rmdir will
first lock b, then a.  So you have a perfect abba deadlock.

Miklos


-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux