diff options
author | Wei Yang <richard.weiyang@gmail.com> | 2024-11-13 06:16:16 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2025-01-14 09:40:41 +0300 |
commit | 7318f95ba40bed454d1e20f27e821198d3def4e5 (patch) | |
tree | 7b60a20eba1c7755c2f7a45b9d5f4de215b523ce | |
parent | c38279d4071992151321b0239c8896baa6563baf (diff) | |
download | linux-7318f95ba40bed454d1e20f27e821198d3def4e5.tar.xz |
maple_tree: only root node could be deficient
Each level's rightmost node should have (max == ULONG_MAX). This means
current validation skips the right most node on each level.
Only the root node may be below the minimum data threshold.
Link: https://lkml.kernel.org/r/20241113031616.10530-4-richard.weiyang@gmail.com
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | lib/maple_tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index ca8ae1e1cc0a..f7153ade1be5 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -7556,7 +7556,7 @@ void mt_validate(struct maple_tree *mt) MAS_WARN_ON(&mas, mte_dead_node(mas.node)); end = mas_data_end(&mas); if (MAS_WARN_ON(&mas, (end < mt_min_slot_count(mas.node)) && - (mas.max != ULONG_MAX))) { + (!mte_is_root(mas.node)))) { pr_err("Invalid size %u of " PTR_FMT "\n", end, mas_mn(&mas)); } |