projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8b6f8c
)
bcachefs: Fix a null ptr deref in bch2_get_alloc_in_memory_pos()
author
Kent Overstreet
<kent.overstreet@linux.dev>
Fri, 22 Sep 2023 18:19:52 +0000
(14:19 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:15 +0000
(17:10 -0400)
Reported-by: smatch
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/backpointers.c
patch
|
blob
|
history
diff --git
a/fs/bcachefs/backpointers.c
b/fs/bcachefs/backpointers.c
index 43defeaa171855d02e7838d52462eb6813a7cabc..cc856150a948ea7859feedcd0bb99493f328fd04 100644
(file)
--- a/
fs/bcachefs/backpointers.c
+++ b/
fs/bcachefs/backpointers.c
@@
-703,7
+703,7
@@
static int bch2_get_alloc_in_memory_pos(struct btree_trans *trans,
--btree_nodes;
if (!btree_nodes) {
- *end = alloc_k.k
->p
;
+ *end = alloc_k.k
? alloc_k.k->p : SPOS_MAX
;
break;
}