mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
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>
This commit is contained in:
parent
e853692588
commit
74ef5b0d3f
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user