diff options
author | Chris Mason <clm@fb.com> | 2015-10-13 14:06:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-27 09:45:56 +0900 |
commit | 997badf1e03dfd39854094f7767e1a4cf5ed310b (patch) | |
tree | 82937b81b859d0fe6352311fb5386243731f087e /kernel/gcov/gcov.h | |
parent | 3408c1b1193ec14c555e21a41b452c1ed012ccec (diff) |
btrfs: fix use after free iterating extrefs
commit dc6c5fb3b514221f2e9d21ee626a9d95d3418dff upstream.
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: Mark Fasheh <mfasheh@suse.de>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/gcov/gcov.h')
0 files changed, 0 insertions, 0 deletions