Skip to contentSkip to conversation

maple_tree-add-write-lock-checking-with-lockdep-sequence-numbers.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Aug 25

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: maple_tree: add write lock checking with lockdep sequence numbers
has been removed from the -mm tree. Its filename was
maple_tree-add-write-lock-checking-with-lockdep-sequence-numbers.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: "Liam R. Howlett (Oracle)" <[email protected]>
Subject: maple_tree: add write lock checking with lockdep sequence numbers
Date: Fri, 21 Aug 2026 15:26:11 -0400

Use the lockdep sequence numbers to ensure the write lock is not dropped between write operations. The lockdep sequence is recorded on any walk that starts from the top of the tree and re-checked prior to any operation using an active node.

When lockdep detects an issue, it sets debug_locks to 0 disabling further reports. __lock_sequnece() will return u32 ~0 when debug_locks is zero, and the real sequnece count cannot return such a high value as it is less than 32bits.

By always updating the sequence number, regardless of lock state and by ignoring ~0 value in the sequence number will avoid ever printing a WARN_ON when lockdep sets debug_locks to 0.

---

 include/linux/maple_tree.h |    7 ++-
 lib/maple_tree.c           |   64 ++++++++++++++++++++++++++++-------
 2 files changed, 57 insertions(+), 14 deletions(-)
include/linux/maple_tree.h renamed from include/linux/maple_tree.h~maple_tree-add-write-lock-checking-with-lockdep-sequence-numbers +5 -2
@@ -484,9 +484,12 @@ struct ma_state {
 	unsigned char mas_flags;
 	unsigned char end;		/* The end of the node */
 	enum store_type store_type;	/* The type of store needed for this operation */
-#if IS_ENABLED(CONFIG_LOCKDEP) && IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD)
+#ifdef CONFIG_LOCKDEP
+	u32 ld_seq;
+#ifdef CONFIG_RCU_STRICT_GRACE_PERIOD
 	unsigned long rcu_gp;
-#endif
+#endif /* CONFIG_RCU_STRICT_GRACE_PERIOD */
+#endif /* CONFIG_LOCKDEP */
 };
 
 struct ma_wr_state {
lib/maple_tree.c renamed from lib/maple_tree.c~maple_tree-add-write-lock-checking-with-lockdep-sequence-numbers +52 -12

123 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are