]> git.proxmox.com Git - mirror_ubuntu-kernels.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>
Thu, 6 Apr 2023 01:06:22 +0000 (18:06 -0700)
commit0a2b18d948838e16912b3b627b504ab062b7d02a
treebf449173908e68d246593d9f3cef153401d1c166
parentc13af03de46ba27674dd9fb31a17c0d480081139
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