diff options
author | Alexandre Oliva <oliva@gnu.org> | 2014-09-23 17:51:27 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-10 18:11:33 +0200 |
commit | 12adc878ae1fd7f187a8b3797e27a48765dd1420 (patch) | |
tree | 1f9b8f744160b3d42c7f9756dac887bce7d4fbe3 /extent-cache.c | |
parent | ca1e04597ada5b767cf883e59eb7e79196ae8487 (diff) |
btrfs-progs: check: do not dereference tree_refs as data_refs
In a filesystem corrupted by a faulty memory module, btrfsck would get
very confused attempting to access backrefs that weren't data backrefs
as if they were. Besides invoking undefined behavior for accessing
potentially-uninitialized data past the end of objects, or with
dynamic types unrelated with the static types held in the
corresponding memory, it used offsets and lengths from such fields
that did not correspond to anything in the filesystem proper.
Moving the test for full backrefs and checking that they're data
backrefs earlier avoided the crash I was running into, but that was
not enough to make the filesystem complete a successful repair.
Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'extent-cache.c')
0 files changed, 0 insertions, 0 deletions