[BUG] 2.6.8-rc3 redboot.c tries to kmalloc 256K

Russell King rmk+lkml at arm.linux.org.uk
Sat Aug 7 08:50:56 EDT 2004


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




More information about the linux-mtd mailing list