Update bcachefs sources to 22ccceee15 bcachefs: Fix a slab-out-of-bounds

This commit is contained in:
Kent Overstreet 2023-04-16 07:14:41 -04:00
parent 807b250927
commit 42edda8db6
2 changed files with 2 additions and 2 deletions

View File

@ -1 +1 @@
504729f99c4e1655be1da3e8c62d20b790483eba
22ccceee1555cd9a66f0b444634a7c0099a73d77

View File

@ -479,7 +479,7 @@ __bch2_alloc_to_v4_mut(struct btree_trans *trans, struct bkey_s_c k)
{
struct bkey_i_alloc_v4 *ret;
ret = bch2_trans_kmalloc(trans, sizeof(struct bkey_i_alloc_v4));
ret = bch2_trans_kmalloc(trans, max(bkey_bytes(k.k), sizeof(struct bkey_i_alloc_v4)));
if (IS_ERR(ret))
return ret;