diff options
author | Chris Mason <clm@fb.com> | 2015-10-13 20:06:48 +0200 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-10-27 03:38:28 +0100 |
commit | 2849a854224487bc578b73b64422c3cb3ef93ff5 (patch) | |
tree | cecc18105ff992cc0ec13283b28ae6f2c038dd5a /fs/btrfs/volumes.c | |
parent | btrfs: check unsupported filters in balance arguments (diff) | |
download | linux-2849a854224487bc578b73b64422c3cb3ef93ff5.tar.xz linux-2849a854224487bc578b73b64422c3cb3ef93ff5.zip |
btrfs: fix use after free iterating extrefs
The code for btrfs inode-resolve has never worked properly for
files with enough hard links to trigger extrefs. It was trying to
get the leaf out of a path after freeing the path:
btrfs_release_path(path);
leaf = path->nodes[0];
item_size = btrfs_item_size_nr(leaf, slot);
The fix here is to use the extent buffer we cloned just a little higher
up to avoid deadlocks caused by using the leaf in the path.
Signed-off-by: Chris Mason <clm@fb.com>
cc: stable@vger.kernel.org # v3.7+
cc: Mark Fasheh <mfasheh@suse.de>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/volumes.c')
0 files changed, 0 insertions, 0 deletions