Re: [PATCH v3 06/13] mm/slab: abstract slabobj_ext.ref access
From: Harry Yoo
Date: Tue Aug 04 2026 - 01:32:08 EST
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)" <vbabka@xxxxxxxxxx>
> 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 <hao.li@xxxxxxxxx>
> Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> Reviewed-by: Harry Yoo (Oracle) <harry@xxxxxxxxxx>
> Link: https://patch.msgid.link/20260727-b4-objext_split-v3-5-c29ef0f1f257@xxxxxxxxxx
> Signed-off-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>
> ---
Thanks, still looks good to me!
--
Cheers,
Harry / Hyeonggon