Skip to content

Commit 5ca98c2

Browse files
committed
Merge tag 'slab-for-6.19-rc8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab
Pull slab fix from Vlastimil Babka: "A stable fix for memory allocation profiling tag not being cleared when aborting an allocation due to memcg charge failure (Hao Ge)" * tag 'slab-for-6.19-rc8-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab: mm/slab: Add alloc_tagging_slab_free_hook for memcg_alloc_abort_single
2 parents f896d1c + e6c53ea commit 5ca98c2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

mm/slub.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6689,8 +6689,12 @@ void slab_free(struct kmem_cache *s, struct slab *slab, void *object,
66896689
static noinline
66906690
void memcg_alloc_abort_single(struct kmem_cache *s, void *object)
66916691
{
6692+
struct slab *slab = virt_to_slab(object);
6693+
6694+
alloc_tagging_slab_free_hook(s, slab, &object, 1);
6695+
66926696
if (likely(slab_free_hook(s, object, slab_want_init_on_free(s), false)))
6693-
do_slab_free(s, virt_to_slab(object), object, object, 1, _RET_IP_);
6697+
do_slab_free(s, slab, object, object, 1, _RET_IP_);
66946698
}
66956699
#endif
66966700

0 commit comments

Comments
 (0)