]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: be more cautious about dead nodes
authorLiam Howlett <Liam.Howlett@oracle.com>
Mon, 27 Feb 2023 17:36:00 +0000 (09:36 -0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Thu, 23 Mar 2023 15:54:00 +0000 (11:54 -0400)
commit922d791fc5bdd197da1b33657710c574878513c8
tree93dbfbded4e8c403cbdc01fffe9ee0835b0c3634
parent8f14c9287768e955a04c59f59bbf63fe44ec12f9
maple_tree: be more cautious about dead nodes

ma_pivots() and ma_data_end() may be called with a dead node.  Ensure to
that the node isn't dead before using the returned values.

This is necessary for RCU mode of the maple tree.

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