mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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
This commit is contained in:
@@ -6689,8 +6689,12 @@ void slab_free(struct kmem_cache *s, struct slab *slab, void *object,
|
||||
static noinline
|
||||
void memcg_alloc_abort_single(struct kmem_cache *s, void *object)
|
||||
{
|
||||
struct slab *slab = virt_to_slab(object);
|
||||
|
||||
alloc_tagging_slab_free_hook(s, slab, &object, 1);
|
||||
|
||||
if (likely(slab_free_hook(s, object, slab_want_init_on_free(s), false)))
|
||||
do_slab_free(s, virt_to_slab(object), object, object, 1, _RET_IP_);
|
||||
do_slab_free(s, slab, object, object, 1, _RET_IP_);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user