diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-29 17:27:47 +0100 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:20 +0200 |
commit | 74ef5b0d3f3f8e290686b309ae595559a8963fde (patch) | |
tree | 10320d9dcc0090a13c9bea274dd6d5ecc22304b9 /fs/bcachefs/btree_update_interior.h | |
parent | bcachefs: Improve error messages in device add path (diff) | |
download | linux-74ef5b0d3f3f8e290686b309ae595559a8963fde.tar.xz linux-74ef5b0d3f3f8e290686b309ae595559a8963fde.zip |
bcachefs: Fix keylist size in btree_update
This fixes a buffer overrun, fortunately caught by a BUG_ON().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.h')
-rw-r--r-- | fs/bcachefs/btree_update_interior.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/bcachefs/btree_update_interior.h b/fs/bcachefs/btree_update_interior.h index 8cf59cee6e4e..8dc86fa636d6 100644 --- a/fs/bcachefs/btree_update_interior.h +++ b/fs/bcachefs/btree_update_interior.h @@ -82,12 +82,12 @@ struct btree_update { /* Nodes being freed: */ struct keylist old_keys; u64 _old_keys[BTREE_UPDATE_NODES_MAX * - BKEY_BTREE_PTR_VAL_U64s_MAX]; + BKEY_BTREE_PTR_U64s_MAX]; /* Nodes being added: */ struct keylist new_keys; u64 _new_keys[BTREE_UPDATE_NODES_MAX * - BKEY_BTREE_PTR_VAL_U64s_MAX]; + BKEY_BTREE_PTR_U64s_MAX]; /* New nodes, that will be made reachable by this update: */ struct btree *new_nodes[BTREE_UPDATE_NODES_MAX]; |