mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 00:32:00 +00:00
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>
This commit is contained in:
parent
aeb6295c17
commit
315c342b8b
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user