mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
bcachefs: Fix a null ptr deref in btree_iter_traverse_one()
When traversing nodes and we've reached the end of the btree, the current btree node will be NULL. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
ae2f17d5ad
commit
b5a5c4c103
1 changed files with 2 additions and 1 deletions
|
@ -1148,7 +1148,8 @@ static int btree_iter_traverse_one(struct btree_iter *iter)
|
|||
iter->uptodate = BTREE_ITER_NEED_PEEK;
|
||||
|
||||
bch2_btree_trans_verify_locks(iter->trans);
|
||||
__bch2_btree_iter_verify(iter, iter->l[iter->level].b);
|
||||
if (btree_iter_node(iter, iter->level))
|
||||
__bch2_btree_iter_verify(iter, iter->l[iter->level].b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue