diff options
author | Nikolay Borisov <[email protected]> | 2018-09-13 11:35:10 +0300 |
---|---|---|
committer | David Sterba <[email protected]> | 2018-10-15 17:23:31 +0200 |
commit | 315bed43fea532650933e7bba316a7601d439edf (patch) | |
tree | ffeeaefa9373a653a6c4dfc4d71a4b4beca5661f /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 28bee489828ca7da9f9a0247a3fbe695fc0df6b4 (diff) |
btrfs: handle error of get_old_root
In btrfs_search_old_slot get_old_root is always used with the assumption
it cannot fail. However, this is not true in rare circumstance it can
fail and return null. This will lead to null point dereference when the
header is read. Fix this by checking the return value and properly
handling NULL by setting ret to -EIO and returning gracefully.
Coverity-id: 1087503
Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: Lu Fengqi <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions