diff options
author | Liu Bo <bo.li.liu@oracle.com> | 2017-10-30 18:14:38 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-11-15 14:47:01 +0100 |
commit | 56a0e706fcf870270878d6d72b71092ae42d229c (patch) | |
tree | b805b64c6152ce3c2f228405e62847960601bed2 /mm | |
parent | btrfs: dev_alloc_list is not protected by RCU, use normal list_del (diff) | |
download | linux-56a0e706fcf870270878d6d72b71092ae42d229c.tar.xz linux-56a0e706fcf870270878d6d72b71092ae42d229c.zip |
Btrfs: bail out gracefully rather than BUG_ON
If a file's DIR_ITEM key is invalid (due to memory errors) and gets
written to disk, a future lookup_path can end up with kernel panic due
to BUG_ON().
This gets rid of the BUG_ON(), meanwhile output the corrupted key and
return ENOENT if it's invalid.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reported-by: Guillaume Bouchard <bouchard@mercs-eng.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions