The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 6.12.y 0/2] mm/slab: fix unbounded recursion in free path with memalloc profiling
@ 2026-08-06  5:37 Harry Yoo (Oracle)
  2026-08-06  5:37 ` [PATCH 6.12.y 1/2] lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled() Harry Yoo (Oracle)
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Harry Yoo (Oracle) @ 2026-08-06  5:37 UTC (permalink / raw)
  To: Suren Baghdasaryan, Andrew Morton, Vlastimil Babka,
	Christoph Lameter, David Rientjes, Roman Gushchin, Harry Yoo,
	Kees Cook, Danielle Costantino, Shakeel Butt, Hao Ge, Hao Li,
	Pedro Falcato, Liam R . Howlett
  Cc: linux-mm, linux-kernel, stable

This is backport of "mm/slab: fix unbounded recursion in free path with
memalloc profiling" series [1] for 6.12.y.

The patch 1 was adjusted for 6.12 as mem_profiling_support is marked
__init in 6.12. I simply resolved this by marking
mem_alloc_profiling_permanently_disabled() __init since in 6.12 we need
it only when creating kmalloc-no-objext-* caches during the boot
process.

Patch 2 has slight functional differences compared to mainline
due to lack of SLAB_ALLOC_* flags, sheaves, and kmalloc_nolock().
I described those subtlties in the backporting notes in detail.

The first two patches from the original patchset [1] are not backported
to 6.12.y as they are no-op in 6.12.y:

 - mm/slab: fix a memory leak due to bootstrapping sheaves twice
 - mm/slab: decouple SLAB_NO_SHEAVES from SLAB_NO_OBJ_EXT

[1] https://lore.kernel.org/all/20260713-kmalloc-no-objext-v3-0-47c7bd138de7@kernel.org

To: Suren Baghdasaryan <surenb@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
To: Vlastimil Babka <vbabka@kernel.org>
To: Christoph Lameter <cl@gentwo.org>
To: David Rientjes <rientjes@google.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
To: Harry Yoo <harry@kernel.org>
To: Kees Cook <kees@kernel.org>
To: Danielle Costantino <dcostantino@meta.com>
To: Shakeel Butt <shakeel.butt@linux.dev>
To: Hao Ge <hao.ge@linux.dev>
To: Hao Li <hao.li@linux.dev>
To: Pedro Falcato <pfalcato@suse.de>,
To: "Liam R . Howlett" <liam@infradead.org>
Cc: linux-mm@kvack.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org

Signed-off-by: Harry Yoo <harry@kernel.org>
---
Harry Yoo (Oracle) (2):
      lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled()
      mm/slab: prevent unbounded recursion in free path with new kmalloc type

 include/linux/alloc_tag.h |  3 +++
 include/linux/slab.h      |  8 +++++++-
 lib/alloc_tag.c           |  9 +++++++++
 mm/slab.h                 | 28 ++++++++++++++++++++++++++--
 mm/slab_common.c          | 13 +++++++++++++
 mm/slub.c                 | 34 +++++++++++++++++++++++-----------
 6 files changed, 81 insertions(+), 14 deletions(-)
---
base-commit: 833291ee77846538926c990bcb468f6f54e9af50
change-id: 20260804-kmalloc-no-objext-for-6-12-y-bedd8e852aeb

Best regards,
-- 
Cheers,
Harry / Hyeonggon


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-06 17:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06  5:37 [PATCH 6.12.y 0/2] mm/slab: fix unbounded recursion in free path with memalloc profiling Harry Yoo (Oracle)
2026-08-06  5:37 ` [PATCH 6.12.y 1/2] lib/alloc_tag: introduce mem_alloc_profiling_permanently_disabled() Harry Yoo (Oracle)
2026-08-06  5:37 ` [PATCH 6.12.y 2/2] mm/slab: prevent unbounded recursion in free path with new kmalloc type Harry Yoo (Oracle)
2026-08-06 17:49 ` [PATCH 6.12.y 0/2] mm/slab: fix unbounded recursion in free path with memalloc profiling Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox