diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-04-16 07:14:41 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-04-16 07:14:41 -0400 |
commit | 42edda8db68f619aa9b08de10cdda6b752c2f901 (patch) | |
tree | b811cbb5a89973b996f99b24f83d77bb0cf3ca03 | |
parent | 807b250927d9c6e829ddd1ff7eac57bf9b056dab (diff) |
Update bcachefs sources to 22ccceee15 bcachefs: Fix a slab-out-of-bounds
-rw-r--r-- | .bcachefs_revision | 2 | ||||
-rw-r--r-- | libbcachefs/alloc_background.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/.bcachefs_revision b/.bcachefs_revision index 192f42ea..02a83950 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -504729f99c4e1655be1da3e8c62d20b790483eba +22ccceee1555cd9a66f0b444634a7c0099a73d77 diff --git a/libbcachefs/alloc_background.c b/libbcachefs/alloc_background.c index aef796b5..8ce2027d 100644 --- a/libbcachefs/alloc_background.c +++ b/libbcachefs/alloc_background.c @@ -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; |