Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754855AbXLGXh3 (ORCPT ); Fri, 7 Dec 2007 18:37:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751424AbXLGXhV (ORCPT ); Fri, 7 Dec 2007 18:37:21 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:60261 "EHLO ebiederm.dsl.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751406AbXLGXhT (ORCPT ); Fri, 7 Dec 2007 18:37:19 -0500 From: ebiederm@xmission.com (Eric W. Biederman) To: Andrew Morton Cc: Trond Myklebust , gnome42@gmail.com, linux-kernel@vger.kernel.org, bfields@fieldses.org, rjw@sisk.pl, "Denis V. Lunev" Subject: Re: 2.6.24-rc3-git4 NFS crossmnt regression References: <20071207040219.e231cbc7.akpm@linux-foundation.org> <1197053179.7532.23.camel@heimdal.trondhjem.org> <1197067918.10831.13.camel@heimdal.trondhjem.org> <20071207151444.af5d8e11.akpm@linux-foundation.org> Date: Fri, 07 Dec 2007 16:35:04 -0700 In-Reply-To: <20071207151444.af5d8e11.akpm@linux-foundation.org> (Andrew Morton's message of "Fri, 7 Dec 2007 15:14:44 -0800") Message-ID: User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3530 Lines: 113 Andrew Morton writes: > On Fri, 07 Dec 2007 17:51:58 -0500 > Trond Myklebust wrote: > >> >> On Fri, 2007-12-07 at 14:39 -0500, Shane wrote: >> > On Dec 7, 2007 2:16 PM, Shane wrote: >> > ... >> > > Confirmed working in rc4-git5. I'll deploy this kernel in a few more >> > > spots and check for other regressions. >> > >> > Hmm, I installed a new kernel built from the same sources on the NFS >> > server. And now I don't see anything at all in the crossmnt dirs. >> > >> > ls /dirA/dirB/dirC --> zero output (empty dir) >> > >> > Are there any other pending fixes? >> > >> > Shane >> >> You've probably fallen afoul of >> >> http://bugzilla.kernel.org/show_bug.cgi?id=9504 >> > > Yeah. > > I have a tentative fix below but I can't seem to get Eric and Denis to get > a suitable fix nailed down. It's urgent! Andrew, if it is truly urgent please grab either fix, as they will sort out the worst of the symptoms. Mine is a little more thorough, and possibly a little less performant. However since mounts don't appear to be residing under /proc/net it isn't a significant issue. > From: "Denis V. Lunev" > > /proc/sys/fs/binfmt_misc dentry disappeared during d_revalidate. > d_revalidate only dentries from shadowed one and below. > http://bugzilla.kernel.org/show_bug.cgi?id=9504 > > Cc: Eric W. Biederman > Cc: Marcus Better > Signed-off-by: Denis V. Lunev > Cc: Marcus Better > Signed-off-by: Andrew Morton > --- > > fs/proc/generic.c | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff -puN fs/proc/generic.c~lost-content-of-proc-sys-fs-binfmt_misc > fs/proc/generic.c > --- a/fs/proc/generic.c~lost-content-of-proc-sys-fs-binfmt_misc > +++ a/fs/proc/generic.c > @@ -380,12 +380,17 @@ static int proc_revalidate_dentry(struct > return 0; > } > > -static struct dentry_operations proc_dentry_operations = > +static struct dentry_operations proc_dentry_shadow_operations = > { > .d_delete = proc_delete_dentry, > .d_revalidate = proc_revalidate_dentry, > }; > > +static struct dentry_operations proc_dentry_operations = > +{ > + .d_delete = proc_delete_dentry, > +}; > + > /* > * Don't create negative dentries here, return -ENOENT by hand > * instead. > @@ -394,6 +399,7 @@ struct dentry *proc_lookup(struct inode > { > struct inode *inode = NULL; > struct proc_dir_entry * de; > + int use_shadow = 0; > int error = -ENOENT; > > lock_kernel(); > @@ -406,8 +412,10 @@ struct dentry *proc_lookup(struct inode > if (!memcmp(dentry->d_name.name, de->name, de->namelen)) > { > unsigned int ino; > > - if (de->shadow_proc) > + if (de->shadow_proc) { > de = de->shadow_proc(current, de); > + use_shadow = 1; > + } > ino = de->low_ino; > de_get(de); > spin_unlock(&proc_subdir_lock); > @@ -423,6 +431,8 @@ struct dentry *proc_lookup(struct inode > > if (inode) { > dentry->d_op = &proc_dentry_operations; > + dentry->d_op = use_shadow ? > + &proc_dentry_shadow_operations : dentry->d_parent->d_op; > d_add(dentry, inode); > return NULL; > } > _ -- 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/