Skip to content
Commit d9534cc9 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: fix buffer overflow in nocow write path



BCH_REPLICAS_MAX isn't the actual maximum number of pointers in an
extent, it's the maximum number of dirty pointers.

We don't have a real restriction on the number of cached pointers, and
we don't want a fixed size array here anyways - so switch to
DARRAY_PREALLOCATED().

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
Reported-and-tested-by: default avatarDaniel J Blueman <daniel@quora.org>
parent 099dc5c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment