[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260205120709.425719-1-hao.li@linux.dev>
Date: Thu, 5 Feb 2026 20:07:23 +0800
From: Hao Li <hao.li@...ux.dev>
To: vbabka@...e.cz, harry.yoo@...cle.com, akpm@...ux-foundation.org,
cl@...two.org, rientjes@...gle.com, roman.gushchin@...ux.dev,
linux-mm@...ck.org, linux-kernel@...r.kernel.org, hao.li@...ux.dev
Cc: akpm@...ux-foundation.org, cl@...two.org, rientjes@...gle.com,
roman.gushchin@...ux.dev, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Hao Li <hao.li@...ux.dev>
Subject: [PATCH] slub: let need_slab_obj_exts() return false if
SLAB_NO_OBJ_EXT is set
SLAB_NO_OBJ_EXT is set for boot caches, but need_slab_obj_exts() doesn't
check this flag. We should return false unconditionally when
SLAB_NO_OBJ_EXT is set.
Signed-off-by: Hao Li <hao.li@...ux.dev>
---
mm/slub.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/slub.c b/mm/slub.c
index 865047eaf02b..3b1402e1c39d 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -901,6 +901,9 @@ static inline unsigned long get_orig_size(struct kmem_cache *s, void *object)
*/
static inline bool need_slab_obj_exts(struct kmem_cache *s)
{
+ if (s->flags & SLAB_NO_OBJ_EXT)
+ return false;
+
if (memcg_kmem_online() && (s->flags & SLAB_ACCOUNT))
return true;
--
2.50.1
Powered by blists - more mailing lists