From: Ingo Molnar <mingo@elte.hu>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Henry Nestler <Henry.Ne@arcor.de>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Alexander Viro <viro@ftp.linux.org.uk>,
Vegard Nossum <vegard.nossum@gmail.com>
Subject: Re: [PATCH] x86: endless page faults in mount_block_root for Linux 2.6
Date: Wed, 30 Apr 2008 00:24:27 +0200 [thread overview]
Message-ID: <20080429222427.GA16629@elte.hu> (raw)
In-Reply-To: <84144f020804290814o18f4868tf6536cc7f16cb8d7@mail.gmail.com>
* Pekka Enberg <penberg@cs.helsinki.fi> wrote:
> On Tue, Apr 29, 2008 at 5:33 PM, Ingo Molnar <mingo@elte.hu> wrote:
> > btw., i have a kmemcheck-reported bug fixed in this same area with the
> > patch below. I dont remember the details anymore, but the root mount
> > code did something really, really weird here.
> >
> > Subject: init: root mount fix
> > From: Ingo Molnar <mingo@elte.hu>
> > Date: Tue Apr 29 16:31:50 CEST 2008
> >
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> > ---
> > init/do_mounts.c | 8 ++++++--
> > 1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > Index: linux/init/do_mounts.c
> > ===================================================================
> > --- linux.orig/init/do_mounts.c
> > +++ linux/init/do_mounts.c
> > @@ -201,9 +201,13 @@ static int __init do_mount_root(char *na
> > return 0;
> > }
> >
> > +#if PAGE_SIZE < PATH_MAX
> > +# error increase the fs_names allocation size here
> > +#endif
> >
> > +
> > void __init mount_block_root(char *name, int flags)
> > {
> > - char *fs_names = __getname();
> > + char *fs_names = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, 1);
> >
> > char *p;
> > #ifdef CONFIG_BLOCK
> > char b[BDEVNAME_SIZE];
> > @@ -251,7 +255,7 @@ retry:
> >
> > #endif
> > panic("VFS: Unable to mount root fs on %s", b);
> > out:
> > - putname(fs_names);
> > + free_pages((unsigned long)fs_names, 1);
> > }
> >
> > #ifdef CONFIG_ROOT_NFS
>
> It could have been a bug in early kmemcheck too. We don't check memory
> allocated with the page allocator, only slab, so this shouldn't
> trigger anything.
no, i tracked it down and the problem was some genuine weirdness in this
code (and not in kmemcheck) but i forgot the details :-)
it was something rather disgusting, the boot parameter parsing stuff.
Ingo
next prev parent reply other threads:[~2008-04-29 22:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-22 22:50 [PATCH] x86: endless page faults in mount_block_root for Linux 2.6 Henry Nestler
2008-04-23 0:18 ` Henry Nestler
2008-04-28 16:46 ` Ingo Molnar
2008-04-28 22:22 ` Henry Nestler
2008-04-29 14:33 ` Ingo Molnar
2008-04-29 15:14 ` Pekka Enberg
2008-04-29 21:06 ` Henry Nestler
2008-04-29 22:24 ` Ingo Molnar [this message]
2008-04-28 16:44 ` Ingo Molnar
2008-05-07 20:52 ` [PATCH] x86: endless page faults in mount_block_root for Linux 2.6 - v2 Henry Nestler
2008-05-07 21:08 ` Henry Nestler
2008-05-07 23:03 ` H. Peter Anvin
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=20080429222427.GA16629@elte.hu \
--to=mingo@elte.hu \
--cc=Henry.Ne@arcor.de \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=penberg@cs.helsinki.fi \
--cc=tglx@linutronix.de \
--cc=vegard.nossum@gmail.com \
--cc=viro@ftp.linux.org.uk \
/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