aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNikolay Borisov <[email protected]>2017-07-11 16:55:51 +0300
committerDavid Sterba <[email protected]>2017-08-16 16:12:02 +0200
commit69f03f137a1cb1a5215bc9e64597bfdfcdf22fde (patch)
treead1f99857cd90e5ba7372d0113d20b8cc3f330f7 /tools/perf/scripts/python
parent1174cade8182b4136c8a162342bf7e8eba7200de (diff)
btrfs: Prevent possible ERR_PTR() dereference
In btrfs_full_stripe_len/btrfs_is_parity_mirror we have similar code which gets the chunk map for a particular range via get_chunk_map. However, get_chunk_map can return an ERR_PTR value and while the 2 callers do catch this with a WARN_ON they then proceed to indiscriminately dereference the extent map. This of course leads to a crash. Fix the offenders by making the dereference conditional on IS_ERR. Signed-off-by: Nikolay Borisov <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions