]> www.infradead.org Git - users/jedix/linux-maple.git/commit
maple_tree: add smp_rmb() to dead node detection
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Mon, 27 Feb 2023 17:36:05 +0000 (09:36 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 28 Mar 2023 23:24:00 +0000 (16:24 -0700)
commit8f8dd3a31578baec883587c2d83d14e94d82f26f
tree7d8701f278c29b8ae9d667e9136b2abc30ad62d9
parent10832508c732ff49796b6b4178e32e8a82411ac1
maple_tree: add smp_rmb() to dead node detection

Add an smp_rmb() before reading the parent pointer to ensure that anything
read from the node prior to the parent pointer hasn't been reordered ahead
of this check.

The is necessary for RCU mode.

Link: https://lkml.kernel.org/r/20230227173632.3292573-7-surenb@google.com
Fixes: 54a611b60590 ("Maple Tree: add new data structure")
Signed-off-by: Liam R. 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