Fail to mount ubifs

Artem Bityutskiy dedekind1 at gmail.com
Tue Jan 12 16:38:01 EST 2010


On Tue, 2010-01-12 at 15:49 -0500, Jon Ringle wrote:
> On Tue, Jan 12, 2010 at 3:23 PM, Jon Ringle <jon at ringle.org> wrote:
> > On Mon, Jan 11, 2010 at 11:50 PM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> >> As this entry suggests:
> >> http://www.linux-mtd.infradead.org/doc/ubifs.html#L_how_send_bugreport
> >>
> >> - validate your flash/driver with the MTD tests - looks like you have a
> >> problem there.
> >
> > Trying to run mtd_readtest I get a seg fault:
> > [   67.470000] Unable to handle kernel NULL pointer dereference at
> > virtual address 00000000
> > [   67.480000] pgd = cf978000
> > [   67.480000] [00000000] *pgd=0d49e031, *pte=00000000, *ppte=00000000
> > [   67.490000] Internal error: Oops: 0 [#1] PREEMPT
> > [   67.490000] Modules linked in: mtd_readtest(+) ixp4xx redboot
> > [   67.490000] CPU: 0    Not tainted  (2.6.31.11-isc #3)
> > [   67.490000] PC is at 0x0
> > [   67.490000] LR is at scan_for_bad_eraseblocks+0x88/0x10c [mtd_readtest]
> 
> I patched mtd_readtest.c with this:
> diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c
> index 79fc453..9edd658 100644
> --- a/drivers/mtd/tests/mtd_readtest.c
> +++ b/drivers/mtd/tests/mtd_readtest.c
> @@ -130,7 +130,7 @@ static int is_block_bad(int ebnum)
>         loff_t addr = ebnum * mtd->erasesize;
>         int ret;
> 
> -       ret = mtd->block_isbad(mtd, addr);
> +       ret = mtd->block_isbad ? mtd->block_isbad(mtd, addr) : 0;
>         if (ret)
>                 printk(PRINT_PREF "block %d is bad\n", ebnum);
>         return ret;
> 
> After this, I ran mtd_readtest and it seemed to complete, but then
> hang after it was done:
> (initramfs) modprobe mtd_readtest dev=1
> [  194.530000]
> [  194.530000] =================================================
> [  194.540000] mtd_readtest: MTD device: 1
> [  194.540000] mtd_readtest: not NAND flash, assume page size is 512 bytes.
> [  194.550000] mtd_readtest: MTD device size 32636928, eraseblock size
> 131072, page size 512, count of eraseblocks 249, pages per eraseblock
> 131072, OOB size 0
> [  194.570000] mtd_readtest: scanning for bad eraseblocks
> [  194.570000] mtd_readtest: scanned 249 eraseblocks, 0 are bad
> [  194.580000] mtd_readtest: testing page read
> [  194.960000] ------------[ cut here ]------------
> [  194.960000] WARNING: at kernel/sched.c:5175 do_page_fault+0x16c/0x1ec()
> [  194.960000] Modules linked in: mtd_readtest(+)

Do you see this on mtdram on your x86 PC?

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list