From: Liam R. Howlett Date: Tue, 22 Jan 2019 15:14:38 +0000 (-0500) Subject: maple_tree: Fix dump debug code when the last slot is null. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=4345426cfe50e9d17ff29130067fe83fab6b371f;p=users%2Fjedix%2Flinux-maple.git maple_tree: Fix dump debug code when the last slot is null. Signed-off-by: Liam R. Howlett --- diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 2f5af8ecfc0e..5d18fef960ce 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -1274,6 +1274,8 @@ void mt_dump_range64(void *entry, unsigned long min, unsigned long max, if (i < (MAPLE_RANGE64_SLOTS - 1)) last = node->pivot[i]; + else if (node->slot[i] == NULL) + break; if (last == 0 && i > 0) break; if (leaf)