lkml.org 
[lkml]   [2003]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG SQUISHED] 2.6.0-test1 devfs question
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/

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:47    [W:0.608 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site