Commit b5a5c4c1 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

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: default avatarKent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent ae2f17d5
......@@ -1148,6 +1148,7 @@ static int btree_iter_traverse_one(struct btree_iter *iter)
iter->uptodate = BTREE_ITER_NEED_PEEK;
bch2_btree_trans_verify_locks(iter->trans);
if (btree_iter_node(iter, iter->level))
__bch2_btree_iter_verify(iter, iter->l[iter->level].b);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment