projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83d539b
)
bcachefs: Fix null ptr deref in invalidate_one_bucket()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 2 Apr 2025 16:48:23 +0000
(12:48 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Thu, 3 Apr 2025 16:11:43 +0000
(12:11 -0400)
bch2_backpointer_get_key() returns bkey_s_c_null when the target isn't
found.
backpointer_get_key() flags the error, so there's nothing else to do
here - just skip it and move on.
Link:
https://github.com/koverstreet/bcachefs/issues/847
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/alloc_background.c
b/fs/bcachefs/alloc_background.c
index
6b6c252
..
94ea9e4
100644
(file)
--- a/
fs/bcachefs/alloc_background.c
+++ b/
fs/bcachefs/alloc_background.c
@@
-2084,6
+2084,9
@@
static int invalidate_one_bp(struct btree_trans *trans,
if (ret)
return ret;
+ if (!extent_k.k)
+ return 0;
+
struct bkey_i *n =
bch2_bkey_make_mut(trans, &extent_iter, &extent_k,
BTREE_UPDATE_internal_snapshot_node);