diff options
author | Daniel Xu <dxu@dxuuu.xyz> | 2020-11-12 17:55:06 -0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-11-13 22:18:10 +0100 |
commit | 1a49a97df657c63a4e8ffcd1ea9b6ed95581789b (patch) | |
tree | 5f4cd560a338e80dcb22fd1a64100e9e72c76686 /fs | |
parent | 6f23277a49e68f8a9355385c846939ad0b1261e7 (diff) |
btrfs: tree-checker: add missing return after error in root_item
There's a missing return statement after an error is found in the
root_item, this can cause further problems when a crafted image triggers
the error.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210181
Fixes: 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check")
CC: stable@vger.kernel.org # 5.4+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/tree-checker.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c index 8784b74f5232..6cefabd27209 100644 --- a/fs/btrfs/tree-checker.c +++ b/fs/btrfs/tree-checker.c @@ -1068,6 +1068,7 @@ static int check_root_item(struct extent_buffer *leaf, struct btrfs_key *key, "invalid root item size, have %u expect %zu or %u", btrfs_item_size_nr(leaf, slot), sizeof(ri), btrfs_legacy_root_item_size()); + return -EUCLEAN; } /* |