Re: [patch 06/14] hfsplus: remove hfsplus_permission()

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

 



> > Semi-concrete: link(2) locks the target's parent and the source.
> > Cross-directory rename(2) locks both parents.  If link's target is a
> > file which has children, this can result in an ABBA deadlock.  That's
> > _before_ the filesystem's ->link() or ->rename() function is called.
> 
> I'm afraid you have to be more concrete than this. 
> hfsplus_file_inode_operations doesn't have a link or rename operation, so 
> if one your source parents above involves a file, it shouldn't get this 
> far or you have to describe your scenario in more detail.

Heh, you just want me to do all the hard work :)

OK, I'll go along:

  /mnt/a/x is a regular file

  ln /mnt/a/x /mnt/b/x
  rename /mnt/a/x /mnt/b/x/p & ln /mnt/b/x /mnt/a/q

Neither ->rename nor ->link is required to be defined on x.  The
rename will first lock x, then a.  The link will first lock a then x,
AFAICS.

This is probably just one of several ways to make it deadlock.

Hmm?

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