summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-09-13 11:35:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-28 18:25:38 +0100
commitea6c95031b68b612147d119487c53b4d703bb339 (patch)
treebe34f8f80d4be703ca4150ab8ac78bd43927ad07 /tools/perf/scripts/python/bin
parent7a82e77fb2a5cfbf37ba8a140f44bb10129c9cdf (diff)
btrfs: handle error of get_old_root
[ Upstream commit 315bed43fea532650933e7bba316a7601d439edf ] 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 <nborisov@suse.com> Reviewed-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions