summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2022-12-01 00:10:46 +0100
committerVlastimil Babka <vbabka@suse.cz>2022-12-01 00:10:46 +0100
commit617666521385ba1a07f9388bc80d24941104e412 (patch)
tree434078dc54a9002c14eecc85da6345415a464401 /mm
parentMerge branch 'slab/for-6.2/alloc_size' into slab/for-next (diff)
parentmm/slub, kunit: Add a test case for kmalloc redzone check (diff)
downloadlinux-617666521385ba1a07f9388bc80d24941104e412.tar.xz
linux-617666521385ba1a07f9388bc80d24941104e412.zip
Merge branch 'slab/for-6.2/kmalloc_redzone' into slab/for-next
Add a new slub_kunit test for the extended kmalloc redzone check, by Feng Tang. Also prevent unwanted kfence interaction with all slub kunit tests.
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/slab.h b/mm/slab.h
index e3b3231af742..060c589a827a 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -346,7 +346,8 @@ static inline slab_flags_t kmem_cache_flags(unsigned int object_size,
SLAB_ACCOUNT)
#elif defined(CONFIG_SLUB)
#define SLAB_CACHE_FLAGS (SLAB_NOLEAKTRACE | SLAB_RECLAIM_ACCOUNT | \
- SLAB_TEMPORARY | SLAB_ACCOUNT | SLAB_NO_USER_FLAGS)
+ SLAB_TEMPORARY | SLAB_ACCOUNT | \
+ SLAB_NO_USER_FLAGS | SLAB_KMALLOC)
#else
#define SLAB_CACHE_FLAGS (SLAB_NOLEAKTRACE)
#endif
@@ -366,6 +367,7 @@ static inline slab_flags_t kmem_cache_flags(unsigned int object_size,
SLAB_RECLAIM_ACCOUNT | \
SLAB_TEMPORARY | \
SLAB_ACCOUNT | \
+ SLAB_KMALLOC | \
SLAB_NO_USER_FLAGS)
bool __kmem_cache_empty(struct kmem_cache *);