tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Deleted parent node in PUFFS lookup
On Thu, Nov 24, 2011 at 02:14:30PM +0100, Emmanuel Dreyfus wrote:
> > When calling lookup, the parent (directory) is supposed to be locked
> > to prevent exactly this sort of thing from happening. You and/or
> > perfuse and/or puffs ignore this at your peril, because doing so
> > violates atomicitiy guarantees and assumptions made by upper-level
> > code.
>
> I don't violate the need for a locked vnode during lookup, the problem
> is with distributed filesystem, where another machine delete the
> directory.
It's not just the vnode that's supposed to be locked; it's the
*directory*, IOW the contents. If it's not, open with O_CREAT|O_EXCL
will probably not work reliably, which is in turn a security hazard.
Although it's perhaps no worse than nfs then...
> > However, if it's really disappeared, why not just fail with ENOENT?
>
> ENOENT tells the kernel that the entry it looked up does not exists. It
> does not tell anything about the parent vnode being now stale.
What does NFS do for ESTALE cases? Whatever it is, there's probably a
way to do it via fuse, and therefore also via perfuse.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index