Re: [PATCH v2 1/1] mm/slab: mark alloc tags empty for sheafs allocated with __GFP_NO_OBJ_EXT

From: Suren Baghdasaryan

Date: Wed Feb 25 2026 - 11:09:11 EST


On Tue, Feb 24, 2026 at 6:26 PM Harry Yoo <harry.yoo@xxxxxxxxxx> wrote:
>
> On Tue, Feb 24, 2026 at 02:11:32PM -0800, Suren Baghdasaryan wrote:
> > alloc_empty_sheaf() allocates sheafs from SLAB_KMALLOC caches using
>
> nit: the plural form of sheaf is "sheaves" ;)

Ack.

>
> > __GFP_NO_OBJ_EXT to avoid recursion, however it does not mark their
> > allocation tags empty before freeing, which results in a warning when
> > CONFIG_MEM_ALLOC_PROFILING_DEBUG is set. Fix this by marking allocation
> > tags for such allocations as empty.
> >
> > Reported-by: David Wang <00107082@xxxxxxx>
> > Closes: https://lore.kernel.org/all/20260223155128.3849-1-00107082@xxxxxxx/
> > Analyzed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
> > Signed-off-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> > ---
>
> This resolves the issue on my machine.
> and the fix looks good to me, so:
>
> Tested-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
>
> and
>
> Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
>
> By the way, perhaps it's worth adding a comment on __GFP_NO_OBJ_EXT
> saying "you need to call mark_objexts_empty() before freeing the
> object".

Good idea. I'll post v3 with that comment and spelling fix.
Thanks!

>
> --
> Cheers,
> Harry / Hyeonggon