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

Harry Yoo <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.cgroups
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/[email protected]
> Signed-off-by: Vlastimil Babka (SUSE) <[email protected]>
> ---

Thanks, still looks good to me!

-- 
Cheers,
Harry / Hyeonggon
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.