]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: fix freeing of nodes in rcu mode
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 27 Feb 2023 17:36:02 +0000 (09:36 -0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 24 Mar 2023 15:18:37 +0000 (11:18 -0400)
commitb317d0932e88d451fe3c20c9f83c3e60a66f80be
tree2ca61207614777dc0a1413f1511e89ce30959585
parente3e5bc20b186f31dc0dc17f97d62d838d1817183
maple_tree: fix freeing of nodes in rcu mode

The walk to destroy the nodes was not always setting the node type and
would result in a destroy method potentially using the values as nodes.
Avoid this by setting the correct node types.  This is necessary for the
RCU mode of the maple tree.

Link: https://lkml.kernel.org/r/20230227173632.3292573-4-surenb@google.com
Cc: <Stable@vger.kernel.org>
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c