MTD concat layer

Robert Kaiser rob at sysgo.de
Wed Mar 6 11:02:29 EST 2002


Hi Jonas,

Am Mittwoch, 6. März 2002 14:37 schrieben Sie:
> I get an OOPS when erasing (jffs gc). I'm not 100% sure that it's
> something wrong with mtdconcat.c but the same thing works if I use the
> amd_flash driver instead of cfi_cmdset_0002 + mtdconcat. It looks lika a
> busfault in concat_erase. I have disassembled vmlinux and it is
> "subdev->size" on line 663 in mtdconcat.c that gives the busfault, maybe
> because the variable i has been assigned a bad value before entering the
> for loop?
>

Hmm, line 663 is the very last line in mtdconcat.c and it doesn't contain
a reference to subdev->size. Could it be line 279 instead ?

I guess I need to set up an environment here and try to reproduce the problem.
Obviously I do not have access to a cris board, so I'll try with my SC520CDP
instead (I have used it for testing before, but I have so far tested with 
JFFS2 only).

In the meantime, could you verify that the bad pointer is really due to i
going beyond bounds, i.e. add something like:

    if(i >= concat->num_subdev)
        BUG();

before line 276. (actually you can copy-paste it from a few lines above).


Cheers

Rob

----------------------------------------------------------------
Robert Kaiser                         email: rkaiser at sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14                    phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany   fax:   (49) 6136 9948-10




More information about the linux-mtd mailing list