bcachefs: Fix a slab-out-of-bounds
authorKent Overstreet <kent.overstreet@linux.dev>
Sun, 16 Apr 2023 11:10:46 +0000 (07:10 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:10:00 +0000 (17:10 -0400)
commit615fccada50247abbc61c6c0a0d9c717b3fb6290
tree68558aa242722f3eec272563970dd62e5806d906
parent853b7393c20d5e129f2b16719102a05bbb5dc36f
bcachefs: Fix a slab-out-of-bounds

In __bch2_alloc_to_v4_mut(), we overrun the buffer we allocate if the
alloc key had backpointers stored in it (which we no longer support).

Fix this with a max() call.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_background.c