diff options
author | Bill O'Donnell <[email protected]> | 2017-02-07 12:59:33 -0800 |
---|---|---|
committer | Darrick J. Wong <[email protected]> | 2017-02-09 10:50:25 -0800 |
commit | b20fe4730ea5c037c16631fb0df659c7b6d4b3b1 (patch) | |
tree | e397e683169623414400ea7ea900109710105d12 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | c5ecb42342852892f978572ddc6dca703460f25a (diff) |
xfs: correct null checks and error processing in xfs_initialize_perag
If pag cannot be allocated, the current error exit path will trip
a null pointer deference error when calling xfs_buf_hash_destroy
with a null pag. Fix this by adding a new error exit labels and
jumping to those accordingly, avoiding the hash destroy and
unnecessary kmem_free on pag.
Up to three things need to be properly unwound:
1) pag memory allocation
2) xfs_buf_hash_init
3) radix_tree_insert
For any given iteration through the loop, any of the above which
succeed must be unwound for /this/ pag, and then all prior
initialized pags must be unwound.
Addresses-Coverity-Id: 1397628 ("Dereference after null check")
Reported-by: Colin Ian King <[email protected]>
Signed-off-by: Bill O'Donnell <[email protected]>
Reviewed-by: Eric Sandeen <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions