]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: detect dead nodes in mas_start()
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 27 Feb 2023 17:36:01 +0000 (09:36 -0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 24 Mar 2023 15:18:37 +0000 (11:18 -0400)
commite3e5bc20b186f31dc0dc17f97d62d838d1817183
treeac4a1552e065b2aff0580cf0d74c84f69b71e2fc
parent7cb7d468e769745d7ecb5c76f6cbe235cfe7ea56
maple_tree: detect dead nodes in mas_start()

When initially starting a search, the root node may already be in the
process of being replaced in RCU mode.  Detect and restart the walk if
this is the case.  This is necessary for RCU mode of the maple tree.

Link: https://lkml.kernel.org/r/20230227173632.3292573-3-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