mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
bcachefs: Fix a null ptr deref in bch2_btree_iter_traverse_one()
We use sentinal values that aren't NULL to indicate there's a btree node at a higher level; occasionally, this may result in btree_iter_up_until_good_node() stopping at one of those sentinal values. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
649a9b68ac
commit
c61b7e21ec
1 changed files with 1 additions and 1 deletions
|
@ -1235,7 +1235,7 @@ static int btree_iter_traverse_one(struct btree_iter *iter)
|
|||
*
|
||||
* XXX correctly using BTREE_ITER_UPTODATE should make this unnecessary
|
||||
*/
|
||||
if (btree_iter_node(iter, iter->level)) {
|
||||
if (is_btree_node(iter, iter->level)) {
|
||||
BUG_ON(!btree_iter_pos_in_node(iter, iter->l[iter->level].b));
|
||||
|
||||
btree_iter_advance_to_pos(iter, &iter->l[iter->level], -1);
|
||||
|
|
Loading…
Reference in a new issue