From: Liam R. Howlett Date: Thu, 18 Feb 2021 14:26:45 +0000 (-0500) Subject: lib/maple_tree: Add check for dead nodes in mt_validate() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=44e456049cce21ff22ba959a6c33e244cda92a28;p=users%2Fjedix%2Flinux-maple.git lib/maple_tree: Add check for dead nodes in mt_validate() Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 65d7ba0ea383..000b49f4f1d8 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -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)) &&