Re: [PATCH v2] fs: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling()

2019-07-30 Thread Darrick J. Wong
On Tue, Jul 30, 2019 at 10:32:06AM +0800, Jia-Ju Bai wrote: > In xchk_da_btree_block_check_sibling(), there is an if statement on > line 274 to check whether ds->state->altpath.blk[level].bp is NULL: > if (ds->state->altpath.blk[level].bp) > > When ds->state->altpath.blk[level].bp is NULL, it

[PATCH v2] fs: xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling()

2019-07-29 Thread Jia-Ju Bai
In xchk_da_btree_block_check_sibling(), there is an if statement on line 274 to check whether ds->state->altpath.blk[level].bp is NULL: if (ds->state->altpath.blk[level].bp) When ds->state->altpath.blk[level].bp is NULL, it is used on line 281: xfs_trans_brelse(...,