From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Subject: Re: [PATCH 2/2] vfs: fix d_path() for unreachable paths Date: Mon, 21 Sep 2009 11:31:07 -0400 Message-ID: <8bd0f97a0909210831g60ceb0e7i96f52690ac6490ed@mail.gmail.com> References: <20090921140220.GD14381@ZenIV.linux.org.uk> <8bd0f97a0909210710h5bb75bcdwb666b51a9155a70a@mail.gmail.com> <20090921143857.GE14381@ZenIV.linux.org.uk> <20090921144336.GF14381@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Miklos Szeredi , akpm@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Valdis.Kletnieks@vt.edu, agruen@suse.de, hch@lst.de, hugh.dickins@tiscali.co.uk, matthew@wil.cx To: Al Viro Return-path: In-Reply-To: <20090921144336.GF14381@ZenIV.linux.org.uk> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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. =C2=A0a suggestion as how to do it cleanly without bloat= ing the >> > code is certainly welcome. =C2=A0it 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... =C2=A0Consider e.g. > =C2=A0 =C2=A0 =C2=A0 =C2=A0mount --bind /proc/cplbinfo/cpu0 /mnt > =C2=A0 =C2=A0 =C2=A0 =C2=A0cat /mnt/icplb > Or, better yet, > =C2=A0 =C2=A0 =C2=A0 =C2=A0mount -t proc none /mnt/cpu > =C2=A0 =C2=A0 =C2=A0 =C2=A0cat /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