Re: [PATCH v3 06/13] mm/slab: abstract slabobj_ext.ref access

Harry Yoo <[email protected]> Tue, 4 Aug 2026 05:31:48 +0000
Newsgroups gmane.linux.kernel.cgroups,gmane.linux.kernel.mm,gmane.linux.kernel
Message-ID <anF4v18W6-aKwuem@dev>
On Wed, Jul 29, 2026 at 11:46:11AM +0200, Vlastimil Babka (SUSE) wrote:
> 
> OK, so updated to this. VM_WARN_ON_ONCE() added later.
> 
> From db9c3501c0f9747fda8fa92d4f640b6fac8050e0 Mon Sep 17 00:00:00 2001
> From: "Vlastimil Babka (SUSE)" <[email protected]>
> Date: Mon, 27 Jul 2026 14:53:59 +0200
> Subject: [PATCH] mm/slab: abstract slabobj_ext.objcg access
> 
> In preparation for changes to the structure, abstract getting and
> setting the objcg field with slab_obj_ext_objcg() and
> slab_obj_ext_set_objcg().
> Rename the field to _objcg to make an unexpected direct access a compile
> error.
> 
> The helpers take a slab pointer, which is currently unused, but will be
> used by a debug check later.
> Since there is no slab pointer easily available in __kfence_free(), just
> drop the debug check there. The whole memcg_kmem accounting in kfence is
> to be removed later anyway.
> 
> Otherwise, no functional change intended.
> 
> Reviewed-by: Hao Li <[email protected]>
> Reviewed-by: Suren Baghdasaryan <[email protected]>
> Reviewed-by: Harry Yoo (Oracle) <[email protected]>
> Link: https://patch.msgid.link/20260727-b4-objext_split-v3-5-c29ef0f1f257-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
> Signed-off-by: Vlastimil Babka (SUSE) <[email protected]>
> ---

Thanks, still looks good to me!

-- 
Cheers,
Harry / Hyeonggon