[RFC PATCH 12/12] mm/kasan: Make quarantine_lock a terminal lock
From: Waiman Long
Date: Thu Nov 08 2018 - 15:36:37 EST
By making quarantine_lock a terminal spinlock, it reduces the lockdep
overhead when this lock is being used.
Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
---
mm/kasan/quarantine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/kasan/quarantine.c b/mm/kasan/quarantine.c
index b209dba..c9d36ab 100644
--- a/mm/kasan/quarantine.c
+++ b/mm/kasan/quarantine.c
@@ -103,7 +103,7 @@ static void qlist_move_all(struct qlist_head *from, struct qlist_head *to)
static int quarantine_tail;
/* Total size of all objects in global_quarantine across all batches. */
static unsigned long quarantine_size;
-static DEFINE_RAW_SPINLOCK(quarantine_lock);
+static DEFINE_RAW_TERMINAL_SPINLOCK(quarantine_lock);
DEFINE_STATIC_SRCU(remove_cache_srcu);
/* Maximum size of the global queue. */
--
1.8.3.1