public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [BUG] 2.6.8-rc3 redboot.c tries to kmalloc 256K
@ 2004-08-07 12:50 Russell King
  2004-08-07 21:58 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2004-08-07 12:50 UTC (permalink / raw)
  To: Linux Kernel List, linux-mtd

Hi,

With 2.6.8-rc3, I'm unable to mount the jffs2 root filesystem on one of
my test systems.  The system uses redboot, so has a redboot partition
table.  However, the kernel was not detecting the table.

After prodding about for a while, I've found that redboot.c seems to
be trying to kmalloc 256K of memory.   The largest size that kmalloc
supports is 128K on MMUfull systems.

static int parse_redboot_partitions(struct mtd_info *master,
                             struct mtd_partition **pparts,
                             unsigned long fis_origin)
{
	...
printk("erasesize: %d\n", master->erasesize);
        buf = kmalloc(master->erasesize, GFP_KERNEL);

        if (!buf)
                return -ENOMEM;

produces:

sa1100-0: Found 2 x16 devices at 0x0 in 32-bit bank
 Intel/Sharp Extended Query Table at 0x0031
cfi_cmdset_0001: Erase suspend on write enabled
Using buffer write method
SA1100 flash: CFI device at 0x00000000, 32MiB, 32-bit
CFI: Found no sa1100-1 device at location zero
cmdlinepart: c03e69ec
cmdlinepart: returned -22
RedBoot: c03e69d8
erasesize: 262144
RedBoot: returned -12
SA1100 flash: using static partition definition
Creating 3 MTD partitions on "sa1100-0":
0x00000000-0x00040000 : "bootloader"
0x00040000-0x00080000 : "bootloader params"
0x00080000-0x02000000 : "jffs"
...
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-07 21:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-07 12:50 [BUG] 2.6.8-rc3 redboot.c tries to kmalloc 256K Russell King
2004-08-07 21:58 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox