path: root/mm/slub.c
diff options
authorSebastian Andrzej Siewior <>2020-07-16 18:47:50 +0200
committerVlastimil Babka <>2021-09-04 10:16:45 +0200
commit94ef0304e2b8dc942f46c74a13841d6b61f61d2f (patch)
treeb72ca84c9330077c80c404405209f0fef80a4fe4 /mm/slub.c
parent5a836bf6b09f99ead1b69457ff39ab3011ece57b (diff)
mm: slub: make object_map_lock a raw_spinlock_t
The variable object_map is protected by object_map_lock. The lock is always acquired in debug code and within already atomic context Make object_map_lock a raw_spinlock_t. Signed-off-by: Sebastian Andrzej Siewior <> Signed-off-by: Vlastimil Babka <>
Diffstat (limited to 'mm/slub.c')
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c
index b7f8b9d34e46..76e56ce55d21 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -452,7 +452,7 @@ static inline bool cmpxchg_double_slab(struct kmem_cache *s, struct page *page,
static unsigned long object_map[BITS_TO_LONGS(MAX_OBJS_PER_PAGE)];
-static DEFINE_SPINLOCK(object_map_lock);
+static DEFINE_RAW_SPINLOCK(object_map_lock);
static void __fill_map(unsigned long *obj_map, struct kmem_cache *s,
struct page *page)
@@ -497,7 +497,7 @@ static unsigned long *get_map(struct kmem_cache *s, struct page *page)
- spin_lock(&object_map_lock);
+ raw_spin_lock(&object_map_lock);
__fill_map(object_map, s, page);
@@ -507,7 +507,7 @@ static unsigned long *get_map(struct kmem_cache *s, struct page *page)
static void put_map(unsigned long *map) __releases(&object_map_lock)
VM_BUG_ON(map != object_map);
- spin_unlock(&object_map_lock);
+ raw_spin_unlock(&object_map_lock);
static inline unsigned int size_from_object(struct kmem_cache *s)