]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: be more cautious about dead nodes
authorLiam R. Howlett <Liam.Howlett@Oracle.com>
Mon, 27 Feb 2023 17:36:00 +0000 (09:36 -0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 24 Mar 2023 15:18:37 +0000 (11:18 -0400)
commit7cb7d468e769745d7ecb5c76f6cbe235cfe7ea56
treea7f7b242314c9c7ec1e7d1bbc35cad859f3e4a54
parente1363f76075b7a64df12f6533f521faa78b6460c
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 R. Howlett <Liam.Howlett@oracle.com>
lib/maple_tree.c