diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-05-05 10:20:19 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2015-05-14 15:41:06 +0200 |
commit | f4fac5d46e6105e9b30c1c93878f81b8488368b0 (patch) | |
tree | 67d7b07aadf4f64ac7a8f0cfcd87af51b29ac91e /utils.h | |
parent | ab5984ff6cce6f12063720b6dafc1afcd6606853 (diff) |
btrfs-progs: fsck: Fix a shallow copy which will leads to segfault.
In copy_inode_rec(), a shallow copy happens on rec->holes rb_root.
So for shared inode case, new rec->holes still points to old rb_root,
and when the old inode record is freed, the new inode_rec->holes will
points to garbage and cause segfault when we try to free new
inode_rec->holes.
Fix it by calling copy_file_extent_holes() to do deep copy.
Reported-by: Eric Sandeen <sandeen@redhat.com>
Reported-by: Filipe David Manana <fdmanana@gmail.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'utils.h')
0 files changed, 0 insertions, 0 deletions