The patch titled Subject: maple_tree: Fix potential insufficient nodes on mas_spanning_rebalance() has been added to the -mm tree. Its filename is maple-tree-add-new-data-structure-fix-2.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/maple-tree-add-new-data-structure-fix-2.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/maple-tree-add-new-data-structure-fix-2.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx> Subject: maple_tree: Fix potential insufficient nodes on mas_spanning_rebalance() When a spanning store occurs at a non-root node but causes an insufficient leave, mas_spanning_rebalance() was not detecting it as a non-root node. This only happened when the spanning write was detected at the root node. Link: https://lkml.kernel.org/r/20220420134737.yuhkl6znauwpp7j5@revolver Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/maple_tree.c~maple-tree-add-new-data-structure-fix-2 +++ a/lib/maple_tree.c @@ -2894,7 +2894,7 @@ static int mas_spanning_rebalance(struct mast->free = &free; mast->destroy = &destroy; l_mas.node = r_mas.node = m_mas.node = MAS_NONE; - if (!mas_is_root_limits(mas) && + if (!mas_is_root_limits(mast->orig_l) && unlikely(mast->bn->b_end <= mt_min_slots[mast->bn->type])) { /* * Do not free the current node as it may be freed in a bulk _ Patches currently in -mm which might be from Liam.Howlett@xxxxxxxxxx are maple-tree-add-new-data-structure-fix-2.patch