]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
lib/maple_tree: Add check for dead nodes in mt_validate()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 18 Feb 2021 14:26:45 +0000 (09:26 -0500)
committerLiam R. Howlett <Liam.Howlett@Oracle.com>
Thu, 18 Feb 2021 14:26:45 +0000 (09:26 -0500)
Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
lib/maple_tree.c

index 65d7ba0ea383de05c8cc6c805602cf485c79c2fa..000b49f4f1d86d43a803c5a03e215e071c753eff 100644 (file)
@@ -6289,6 +6289,7 @@ void mt_validate(struct maple_tree *mt)
 
        mas_first_entry(&mas, ULONG_MAX, &r_start);
        while (!mas_is_none(&mas)) {
+               MT_BUG_ON(mas.tree, mte_dead_node(mas.node));
                if (!mte_is_root(mas.node)) {
                        end = mas_data_end(&mas);
                        if ((end < mt_min_slot_count(mas.node)) &&