The patch titled Subject: maple_tree: relax lockdep checks for on-stack trees has been added to the -mm mm-unstable branch. Its filename is maple_tree-relax-lockdep-checks-for-on-stack-trees.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/maple_tree-relax-lockdep-checks-for-on-stack-trees.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx> Subject: maple_tree: relax lockdep checks for on-stack trees Date: Fri, 14 Jul 2023 15:55:49 -0400 To support early release of the maple tree locks, do not lockdep check the lock if it is set to NULL. This is intended for the special case on-stack use of tracking entries and not for general use. Link: https://lkml.kernel.org/r/20230714195551.894800-3-Liam.Howlett@xxxxxxxxxx Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Oliver Sang <oliver.sang@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/maple_tree.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/include/linux/maple_tree.h~maple_tree-relax-lockdep-checks-for-on-stack-trees +++ a/include/linux/maple_tree.h @@ -182,7 +182,9 @@ enum maple_type { #ifdef CONFIG_LOCKDEP typedef struct lockdep_map *lockdep_map_p; -#define mt_lock_is_held(mt) lock_is_held(mt->ma_external_lock) +#define mt_lock_is_held(mt) \ + (!(mt)->ma_external_lock || lock_is_held((mt)->ma_external_lock)) + #define mt_set_external_lock(mt, lock) \ (mt)->ma_external_lock = &(lock)->dep_map #else _ Patches currently in -mm which might be from Liam.Howlett@xxxxxxxxxx are mm-mmap-clean-up-validate_mm-calls.patch maple_tree-relax-lockdep-checks-for-on-stack-trees.patch mm-mmap-change-detached-vma-locking-scheme.patch maple_tree-be-more-strict-about-locking.patch