Menu

#32 u-boot jffs2 bug

master head
open
Aaron.Wu
None
low
assigned
ALL
2014-11-13
2014-08-01
q2l
No

Hello.
I have some issue. I'm embedded linux developer. I have a myself board with NAND Flash Spansion S34M01G200TFI000 1 Gbit (128 Mb).

I'm Boot u'boot successful. But when i call command 'fsload' board crash.
Call trace:
common/cmd_jffs2.c: from do_jffs2_fsload() call jffs2_1pass_load()
fs/jffs2/jffs2_1pass.c: from jffs2_1pass_load() call jffs2_get_list()
fs/jffs2/jffs2_1pass.c: from jffs2_get_list() call jffs2_1pass_build_lists()
fs/jffs2/jffs2_1pass.c: from jffs2_1pass_build_lists() calculate max_totlen
and allocate memory
1711: pL->readbuf = malloc(max_totlen);
On my fs it equal max_totlen = 3096.
But in real life jffs2 node have size over 4000. And when call
725: get_node_mem(b->offset, pL->readbuf);
of course data read in to wrong memory.

I pached fs/jffs2/jffs2_1pass.c :
1447: u32 max_totlen = part->sector_size;
and all right.

Sorry for my BAD English.

Discussion

  • Aaron.Wu

    Aaron.Wu - 2014-08-04

    Please open a help thread in our official support website: https://ez.analog.com/community/dsp/software-and-development-tools/uboot-blackfin. With very detailed information including:
    1) processor type
    2) board type
    3) software version
    4) complete operation and output error log
    5) other information help to reproduce this issue

     
  • Sonic Zhang

    Sonic Zhang - 2014-11-13
    • assigned_to: Aaron.Wu
    • Resolution: none --> assigned
     
  • q2l

    q2l - 2014-11-13

    information including:
    1) BF527 rev 0.2
    2) Custom
    3) u-boot-2011.11-2011R1-RC5

     

Log in to post a comment.