diff options
| author | Liu Bo <[email protected]> | 2016-06-23 16:32:45 -0700 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2016-07-26 13:52:25 +0200 |
| commit | 5e24e9af01abcb151173bb133f1a72b94239c670 (patch) | |
| tree | acaaca007c5763a9f6309de02fa4459946132e67 /scripts/gdb | |
| parent | 6fb37b756acce6d6e045f79c3764206033f617b4 (diff) | |
Btrfs: error out if generic_bin_search get invalid arguments
With btrfs-corrupt-block, one can set btree node/leaf's field, if
we assign a negative value to node/leaf, we can get various hangs,
eg. if extent_root's nritems is -2ULL, then we get stuck in
btrfs_read_block_groups() because it has a while loop and
btrfs_search_slot() on extent_root will always return the first
child.
This lets us know what's happening and returns a EINVAL to callers
instead of returning the first item.
Signed-off-by: Liu Bo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'scripts/gdb')
0 files changed, 0 insertions, 0 deletions