summaryrefslogtreecommitdiff
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorLiam R. Howlett <Liam.Howlett@Oracle.com>2023-04-11 11:10:54 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-13 16:55:40 +0200
commit9b6627bc36aaf426f11b3531aa26d48513c68cbf (patch)
treed2b6dc89fe24062e92d3fc74ce712f6136e24cd4 /kernel/fork.c
parenta29025a1b61cfe48d13dbc23e19b07507ef44054 (diff)
downloadlinux-9b6627bc36aaf426f11b3531aa26d48513c68cbf.tar.gz
linux-9b6627bc36aaf426f11b3531aa26d48513c68cbf.tar.bz2
linux-9b6627bc36aaf426f11b3531aa26d48513c68cbf.zip
maple_tree: add RCU lock checking to rcu callback functions
commit 790e1fa86b340c2bd4a327e01c161f7a1ad885f6 upstream. Dereferencing RCU objects within the RCU callback without the RCU check has caused lockdep to complain. Fix the RCU dereferencing by using the RCU callback lock to ensure the operation is safe. Also stop creating a new lock to use for dereferencing during destruction of the tree or subtree. Instead, pass through a pointer to the tree that has the lock that is held for RCU dereferencing checking. It also does not make sense to use the maple state in the freeing scenario as the tree walk is a special case where the tree no longer has the normal encodings and parent pointers. Link: https://lkml.kernel.org/r/20230227173632.3292573-8-surenb@google.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Cc: stable@vger.kernel.org Reported-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/fork.c')
0 files changed, 0 insertions, 0 deletions