]> 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)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:24:00 +0000 (16:24 -0700)
commit977c32a3a42e2c0dc1710c2a95e1f72da8a290ac
tree11560be75d76b06887cc5368d757505a83d7390d
parent2218a475c73b8fceb1cbbfb87356f63719268013
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
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/maple_tree.c