[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <67ebb9f2-b383-4b68-949e-239d8c7b18f0@suse.cz>
Date: Fri, 6 Feb 2026 10:40:54 +0100
From: Vlastimil Babka <vbabka@...e.cz>
To: Harry Yoo <harry.yoo@...cle.com>, Hao Li <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
Subject: Re: [PATCH] slub: let need_slab_obj_exts() return false if
SLAB_NO_OBJ_EXT is set
On 2/6/26 01:53, Harry Yoo wrote:
> On Thu, Feb 05, 2026 at 08:07:23PM +0800, Hao Li wrote:
>> 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>
>> ---
>
> Looks reasonable to me,
> Acked-by: Harry Yoo <harry.yoo@...cle.com>
Thanks, added to slab/for-7.0/obj_metadata
I think it doesn't change anything at the moment? But a correct thing to do.
> Thanks!
>
>> 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;
>>
>
Powered by blists - more mailing lists