]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: detect dead nodes in mas_start()
authorLiam Howlett <Liam.Howlett@oracle.com>
Mon, 27 Feb 2023 17:36:01 +0000 (09:36 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 5 Apr 2023 23:01:30 +0000 (16:01 -0700)
commit15213cd6928c36c45da75f17b89addb9d3e95352
treee4d58f561b9e0a9e3b7ac3e4c356f0e35756c1ff
parent72c78aaccbe4d8762f0514a93c337c2fca8e6ce3
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
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