]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: fix freeing of nodes in rcu mode
authorLiam Howlett <Liam.Howlett@oracle.com>
Mon, 27 Feb 2023 17:36:02 +0000 (09:36 -0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 23 Mar 2023 15:54:00 +0000 (11:54 -0400)
commitd29411ba16bea8808d15674ce067f2933b86bff7
tree9aaa9a757df2759249fd36c9846b129ee7b8130c
parent63242f1c6d84cdfe34cd94aa9345f964a3de1f36
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 Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c