Re: [PATCH for-next v3 3/7] mm/slab: handle SLAB_FREE_NOLOCK in slab_free_hook() instead of open coding
From: Vlastimil Babka (SUSE)
Date: Wed Nov 18 2026 - 10:54:56 EST
On 11/15/26 16:09, Harry Yoo (Meta) wrote:
> kfree_nolock() deliberately skips slab free hooks that should not be
> called in unknown context. However, there is one more place that
> needs the same thing: memcg_alloc_abort_single().
>
> Instead of open coding slab_free_hook(), let it handle
> SLAB_FREE_NOLOCK. This is required to correctly handle allocation
> failures due to memcg charging.
>
> kfree_nolock() now respects init_on_free which has been ignored.
> Besides that, no functional change intended.
>
> Fixes: af92793e52c3 ("slab: Introduce kmalloc_nolock() and kfree_nolock().")
> Signed-off-by: Harry Yoo (Meta) <harry@xxxxxxxxxx>
The sashiko issue seems pre-existing and orthogoval. LGTM.
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@xxxxxxxxxx>