Re: [PATCH 2/2] vfs: fix d_path() for unreachable paths

From: Mike Frysinger
Date: Mon Sep 21 2009 - 11:31:34 EST


On Mon, Sep 21, 2009 at 10:43, Al Viro wrote:
> On Mon, Sep 21, 2009 at 03:38:57PM +0100, Al Viro wrote:
>> On Mon, Sep 21, 2009 at 10:10:17AM -0400, Mike Frysinger wrote:
>> > it works without having to copy & paste the same exact structures over
>> > and over. Âa suggestion as how to do it cleanly without bloating the
>> > code is certainly welcome. Âit doesnt really matter that it's on the
>> > stack as the usage is small and d_path() is given the size of the
>> > buffer, so it isnt going to overflow.
>
> PS: as to why it is broken... ÂConsider e.g.
> Â Â Â Âmount --bind /proc/cplbinfo/cpu0 /mnt
> Â Â Â Âcat /mnt/icplb
> Or, better yet,
> Â Â Â Âmount -t proc none /mnt/cpu
> Â Â Â Âcat /mnt/cpu/cplbinfo/cpu0/icplb

i'm not disagreeing that it doesnt work under all random VFS
scenarios. just that the realistic ones all work.
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/