]> 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>
Wed, 5 Apr 2023 23:01:31 +0000 (16:01 -0700)
commita7d02ae59b7a4eee940443009b257a417619b52c
tree7d8701f278c29b8ae9d667e9136b2abc30ad62d9
parent9b50a95a0df1035463755c6963a974c49f084e99
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