Re: [PATCH] one of $BIGNUM devfs races

Richard Gooch (rgooch@ras.ucalgary.ca)
Tue, 7 Aug 2001 16:13:59 -0600


Alexander Viro writes:
>
>
> On Tue, 7 Aug 2001, Richard Gooch wrote:
>
> > Hm. strace suggests my pwd is walking up the path. But WTF would it
> > break? 2.4.7 was fine. What did I break?
>
> Walking the path works so:
>
> open ..
> read it, entry by entry
> find an entry that would have inode number equal to that of our directory.
> We had found the last component of our name. Lather, rinse, repeat.

Yes, I know the algorithm.

> It relies on numbers from stat() and numbers from readdir() being
> in sync. It's not true on so many filesystems that this algorithm
> is laughable. Anything with synthetic inode numbers breaks it.

Sure, but devfs does keep inums in sync. So it shouldn't be an issue.

[From another reply]
> So fix getcwd(3) in libc5.

Well, I might just do that one day. But I've got some devfs races to
fix first :-)

> Or use your ->dentry in devfs_readdir() - then you can get the
> consistency you want for existing inodes and that will allow b0rken
> getcwd() to work.

Yes, devfs_readdir() already uses de->inode.ino. Anyway, when I get
back to that machine I'll be able to dig further.

Regards,

Richard....
Permanent: rgooch@atnf.csiro.au
Current: rgooch@ras.ucalgary.ca
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/