From: ebiederm@xmission.com (Eric W. Biederman)
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
gnome42@gmail.com, linux-kernel@vger.kernel.org,
bfields@fieldses.org, rjw@sisk.pl,
"Denis V. Lunev" <den@openvz.org>
Subject: Re: 2.6.24-rc3-git4 NFS crossmnt regression
Date: Fri, 07 Dec 2007 16:35:04 -0700 [thread overview]
Message-ID: <m14peuqdsn.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20071207151444.af5d8e11.akpm@linux-foundation.org> (Andrew Morton's message of "Fri, 7 Dec 2007 15:14:44 -0800")
Andrew Morton <akpm@linux-foundation.org> writes:
> On Fri, 07 Dec 2007 17:51:58 -0500
> Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
>
>>
>> On Fri, 2007-12-07 at 14:39 -0500, Shane wrote:
>> > On Dec 7, 2007 2:16 PM, Shane <gnome42@gmail.com> 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" <den@openvz.org>
>
> /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 <ebiederm@xmission.com>
> Cc: Marcus Better <marcus@better.se>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Cc: Marcus Better <marcus@better.se>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> 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;
> }
> _
next prev parent reply other threads:[~2007-12-07 23:37 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 4:45 2.6.24-rc3-git4 NFS crossmnt regression Shane
2007-12-07 12:02 ` Andrew Morton
2007-12-07 18:14 ` Shane
2007-12-07 18:36 ` Shane
2007-12-07 18:46 ` Trond Myklebust
2007-12-07 18:55 ` Shane
2007-12-07 19:16 ` Shane
2007-12-07 19:39 ` Shane
2007-12-07 22:51 ` Trond Myklebust
2007-12-07 23:14 ` Andrew Morton
2007-12-07 23:35 ` Eric W. Biederman [this message]
2007-12-07 23:43 ` Rafael J. Wysocki
2007-12-08 0:00 ` Alexey Dobriyan
2007-12-08 0:15 ` Andrew Morton
2007-12-08 2:13 ` Shane
2007-12-08 4:18 ` Eric W. Biederman
2007-12-08 4:25 ` [PATCH 2.6.24-rc4] proc: Remove/Fix proc generic d_revalidate Eric W. Biederman
2007-12-08 17:15 ` Shane
2007-12-10 2:52 ` Petr Vandrovec
2007-12-10 13:32 ` Denis V. Lunev
2007-12-10 19:35 ` Andrew Morton
2007-12-10 21:35 ` vandrove
2007-12-08 4:39 ` 2.6.24-rc3-git4 NFS crossmnt regression Eric W. Biederman
2007-12-09 0:20 ` Maxim Levitsky
2007-12-09 19:50 ` J. Bruce Fields
2007-12-10 5:03 ` Neil Brown
2007-12-10 14:19 ` Maxim Levitsky
2007-12-10 14:36 ` J. Bruce Fields
2007-12-10 15:05 ` Maxim Levitsky
2007-12-10 15:47 ` J. Bruce Fields
2007-12-10 18:22 ` Maxim Levitsky
2007-12-10 21:03 ` Andrew Morton
2007-12-12 2:01 ` 2.6.24-rc3-git4 NFS crossmnt regression [SOLVED] Maxim Levitsky
2007-12-12 2:15 ` Andrew Morton
2007-12-12 2:19 ` Trond Myklebust
2007-12-12 2:44 ` Andrew Morton
2007-12-12 2:24 ` Maxim Levitsky
2007-12-10 19:51 ` 2.6.24-rc3-git4 NFS crossmnt regression Shane
2007-12-07 22:33 ` Andrew Morton
2007-12-07 22:39 ` Trond Myklebust
2007-12-07 19:54 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m14peuqdsn.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=den@openvz.org \
--cc=gnome42@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).