maple_tree: make mas_validate_limits() check root node and node limit
authorPeng Zhang <zhangpeng.00@bytedance.com>
Tue, 11 Jul 2023 03:54:41 +0000 (11:54 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:22 +0000 (10:12 -0700)
commit33af39d0244ce4944ab16728f7b04df9dfc6d365
tree96568a952e7b8844557b0b312986314967f0b0d0
parente93fda5a1ab7a0c6143ae8a6f231c9f5f3c417b1
maple_tree: make mas_validate_limits() check root node and node limit

Update mas_validate_limits() to check root node, check node limit pivot if
there is enough room for it to exist and check data_end.  Remove the check
for child existence as it is done in mas_validate_child_slot().

Link: https://lkml.kernel.org/r/20230711035444.526-6-zhangpeng.00@bytedance.com
Signed-off-by: Peng Zhang <zhangpeng.00@bytedance.com>
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c