u-boot/fs
Lars Poeschel 349a8d5e56 ubifs bad superblock bug
This patch fixes an issue when ubifs reads a bad superblock. Later it
tries to free memory, that was not allocated, which freezes u-boot.
This is fixed by looking for a non null pointer before free.

The message I got before u-boot freezes:
UBI: max/mean erase counter: 53/32
UBIFS: mounted UBI device 0, volume 1, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   49140 bytes (50319360 KiB, 0 MiB, 49140 LEBs)
UBIFS: journal size:       49 bytes (6838272 KiB, 0 MiB, 6678 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  0 bytes (0 KiB)
UBIFS error (pid 0): ubifs_read_node: bad node type (255 but expected 9)
UBIFS error (pid 0): ubifs_read_node: bad node at LEB 330:13104
UBIFS error (pid 0): ubifs_iget: failed to read inode 1, error -22
Error reading superblock on volume 'ubi:rootfs'!

Signed-off-by: Lars Poeschel <larsi@wh2.tu-dresden.de>
Cc: Kyungmin Park <kmpark@infradead.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2011-10-12 11:33:17 +02:00
..
cramfs cramfs: make cramfs usable without a NOR flash 2011-05-10 22:47:32 +02:00
ext2 ext2: Simplify partial sector access logic 2011-07-28 15:36:32 +02:00
fat fat: replace LINEAR_PREFETCH_SIZE with PREFETCH_BLOCKS 2011-10-01 21:52:19 +02:00
fdos Convert ISO-8859 files to UTF-8 2011-08-04 23:34:02 +02:00
jffs2 fs/jffs2/jffs2_1pass.c: fix warning: variable ... set but not used 2011-10-09 23:24:49 +02:00
reiserfs Switch from archive libraries to partial linking 2010-11-17 21:02:18 +01:00
ubifs ubifs bad superblock bug 2011-10-12 11:33:17 +02:00
yaffs2 YAFFS2: fs/yaffs2/yaffs_guts.c - fix build warnings 2011-09-10 00:00:32 +02:00
Makefile UBIFS: Implement read-only UBIFS support in U-Boot 2009-03-20 22:39:15 +01:00