Commit 03cc1e67 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix null ptr deref in bch2_backpointer_get_node()



bch2_btree_iter_peek_node() can return a NULL ptr (when the tree is
shorter than the search depth); handle this with an early return.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Fixes: https://lore.kernel.org/linux-bcachefs/5fc3c28b-c232-4ec7-b0ac-4ef220ddf976@moroto.mountain/T/


Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 274c2f8f
Supports Markdown
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