From: Daniele Venzano <webvenza@libero.it>
To: Andrew Morton <akpm@osdl.org>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [BUG SQUISHED] 2.6.0-test1 devfs question
Date: Mon, 28 Jul 2003 17:59:17 +0200 [thread overview]
Message-ID: <20030728155917.GA844@renditai.milesteg.arr> (raw)
In-Reply-To: <20030728002216.4c3afb60.akpm@osdl.org>
On Mon, Jul 28, 2003 at 12:22:16AM -0700, Andrew Morton wrote:
> "Andrey Borzenkov" <arvidjaar@mail.ru> wrote:
> >
> > the bug is almost for sure in init/do_mount_devfs.c:read_dir; it
> > allocates static buffer of size at most 2**MAX_ORDER and tries to
> > read the whole dir at once.
>
> Yes, that function is buggy.
>
> diff -puN init/do_mounts_devfs.c~read_dir-fix init/do_mounts_devfs.c
> --- 25/init/do_mounts_devfs.c~read_dir-fix 2003-07-28 00:21:40.000000000 -0700
> +++ 25-akpm/init/do_mounts_devfs.c 2003-07-28 00:21:40.000000000 -0700
> @@ -54,7 +54,7 @@ static void * __init read_dir(char *path
> if (fd < 0)
> return NULL;
>
> - for (size = 1 << 9; size <= (1 << MAX_ORDER); size <<= 1) {
> + for (size = 1 << 9; size <= (PAGE_SIZE << MAX_ORDER); size <<= 1) {
> void *p = kmalloc(size, GFP_KERNEL);
> int n;
> if (!p)
>
> _
This patch solves the problem, the kernel boots fine and finds the root
device using root=/dev/md2 as boot option.
The output during boot is:
[...]
raid1: raid set md2 active with 2 out of 2 mirrors
md: ... autorun DONE.
create_dev: name=/dev/root dev=902 dname=md2
create_dev: found real device /dev/md/2
[...]
Thanks everyone, bye.
--
----------------------------------------
Daniele Venzano
Web: http://digilander.iol.it/webvenza/
prev parent reply other threads:[~2003-07-28 15:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-28 7:13 2.6.0-test1 devfs question "Andrey Borzenkov"
2003-07-28 7:22 ` Andrew Morton
2003-07-28 15:59 ` Daniele Venzano [this message]
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=20030728155917.GA844@renditai.milesteg.arr \
--to=webvenza@libero.it \
--cc=akpm@osdl.org \
--cc=arvidjaar@mail.ru \
--cc=linux-kernel@vger.kernel.org \
/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).