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

From: Russell King
Date: Sat Aug 07 2004 - 07:52:15 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/