diff options
author | Joel Stanley <joel@jms.id.au> | 2019-11-29 10:49:30 +1030 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-06-20 13:25:32 +0200 |
commit | 44cd706c96e0da8f806b89e0fb3d65a68bbdeb56 (patch) | |
tree | ac6f7308a45d0d5afa1e9c663ba36ed2cdc8a6d7 /cpukit/libfs | |
parent | jffs2: Fix memory leak in jffs2_scan_eraseblock() error path (diff) | |
download | rtems-44cd706c96e0da8f806b89e0fb3d65a68bbdeb56.tar.bz2 |
Revert "jffs2: Fix possible null-pointer dereferences in jffs2_add_frag_to_fragtree()"
This reverts commit f2538f999345405f7d2e1194c0c8efa4e11f7b3a. The patch
stopped JFFS2 from being able to mount an existing filesystem with the
following errors:
jffs2: error: (77) jffs2_build_inode_fragtree: Add node to tree failed -22
jffs2: error: (77) jffs2_do_read_inode_internal: Failed to build final fragtree for inode #5377: error -22
Fixes: f2538f999345 ("jffs2: Fix possible null-pointer dereferences...")
Cc: stable@vger.kernel.org
Suggested-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'cpukit/libfs')
-rw-r--r-- | cpukit/libfs/src/jffs2/src/nodelist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libfs/src/jffs2/src/nodelist.c b/cpukit/libfs/src/jffs2/src/nodelist.c index 86dd8e60d1..ee44024c92 100644 --- a/cpukit/libfs/src/jffs2/src/nodelist.c +++ b/cpukit/libfs/src/jffs2/src/nodelist.c @@ -228,7 +228,7 @@ static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *r lastend = this->ofs + this->size; } else { dbg_fragtree2("lookup gave no frag\n"); - return -EINVAL; + lastend = 0; } /* See if we ran off the end of the fragtree */ |