From: Henry Nestler <Henry.Ne@Arcor.de>
To: linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86: endless page faults in mount_block_root for Linux 2.6
Date: Wed, 23 Apr 2008 02:18:49 +0200 [thread overview]
Message-ID: <480E8069.20502@henry.ne.arcor.de> (raw)
In-Reply-To: <480E6BB4.5080902@henry.nestler.gmail.com>
An other fix would be to copy the "fs_names+offset" into a new page and
give a page alignment buffer to do_mount_root. I feel it is better to
fix the fault handler for all failed addresses, not only the mount?
--- linux-2.6.25/init/do_mounts.c
+++ linux-2.6.25/init/do_mounts.c
@@ -204,6 +204,7 @@
void __init mount_block_root(char *name, int flags)
{
char *fs_names = __getname();
+ char *fs_type = __getname();
char *p;
#ifdef CONFIG_BLOCK
char b[BDEVNAME_SIZE];
@@ -214,7 +215,12 @@
get_fs_names(fs_names);
retry:
for (p = fs_names; *p; p += strlen(p)+1) {
- int err = do_mount_root(name, p, flags, root_mount_data);
+ int err;
+
+ /* fs_type must size >= PAGE_SIZE or in user space */
+ strcpy(fs_type, p);
+
+ err = do_mount_root(name, fs_type, flags, root_mount_data);
switch (err) {
case 0:
goto out;
@@ -251,6 +257,7 @@
#endif
panic("VFS: Unable to mount root fs on %s", b);
out:
+ putname(fs_type);
putname(fs_names);
}
--
Henry N.
next prev parent reply other threads:[~2008-04-23 0:18 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 [this message]
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
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=480E8069.20502@henry.ne.arcor.de \
--to=henry.ne@arcor.de \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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