summaryrefslogtreecommitdiff
path: root/include/mk48t59.h
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@cisco.com>2015-11-18 12:42:53 -0500
committerTom Rini <trini@konsulko.com>2015-11-23 11:01:52 -0500
commit54d68e9333ff65d135faac68fa01be4276f1371f (patch)
treeaaf2d56aa76f2b1b3a4566ca60d4e054237ff3f1 /include/mk48t59.h
parentb4bd6554937ca5c13786b6725e122839f5ebe4f7 (diff)
downloadu-boot-imx-54d68e9333ff65d135faac68fa01be4276f1371f.zip
u-boot-imx-54d68e9333ff65d135faac68fa01be4276f1371f.tar.gz
u-boot-imx-54d68e9333ff65d135faac68fa01be4276f1371f.tar.bz2
fs: ext4: Prevent infinite loop in ext4fs_iterate_dir
If the ext3 journal gets out of sync with what is written on disk, for example because of an unexpected power cut, ext4fs_read_file can return an all-zero directory entry. In that case, ext4fs_iterate_dir would infinite loop. This patch detects when a directory entry's direntlen member is 0 and returns a failure status, which breaks out of the infinite loop. As a result, U-Boot will not find files that may subsequently be recovered when the journal is replayed. This is better behaviour than hanging in an infinite loop, but as a further improvement maybe U-Boot could interpret the ext3 journal and actually find the unsynced entries. Signed-off-by: Thomas Fitzsimmons <fitzsim@cisco.com> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'include/mk48t59.h')
0 files changed, 0 insertions, 0 deletions