diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-11-06 12:09:29 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-11-09 09:10:45 -0800 |
commit | a605e86912ba6fc4b79084c286b1b45e753b72cc (patch) | |
tree | 288ea5b1045bef9c662774a7d81bd8b85b49b5b3 /fs/xfs | |
parent | 72f76f73642fa8528cab098b5f66abb299f1a018 (diff) |
xfs: fix btree scrub deref check
The btree scrubber has some custom code to retrieve and check a btree
block via xfs_btree_lookup_get_block. This function will either return
an error code (verifiers failed) or a *pblock will be untouched (bad
pointer). Since we previously set *pblock to NULL, we need to check
*pblock, not pblock, to trigger the early bailout.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/scrub/btree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c index a81440496e7b..df0766132ace 100644 --- a/fs/xfs/scrub/btree.c +++ b/fs/xfs/scrub/btree.c @@ -335,7 +335,7 @@ xfs_scrub_btree_get_block( error = xfs_btree_lookup_get_block(bs->cur, level, pp, pblock); if (!xfs_scrub_btree_process_error(bs->sc, bs->cur, level, &error) || - !pblock) + !*pblock) return error; xfs_btree_get_block(bs->cur, level, pbp); |