linux-yocto/mm
SeongJae Park 78b4eb9975 mm/damon/sysfs: cleanup attrs subdirs on context dir setup failure
commit 9814cc832b88bd040fc2a1817c2b5469d0f7e862 upstream.

When a context DAMON sysfs directory setup is failed after setup of attrs/
directory, subdirectories of attrs/ directory are not cleaned up.  As a
result, DAMON sysfs interface is nearly broken until the system reboots,
and the memory for the unremoved directory is leaked.

Cleanup the directories under such failures.

Link: https://lkml.kernel.org/r/20251225023043.18579-3-sj@kernel.org
Fixes: c951cd3b89 ("mm/damon: implement a minimal stub for sysfs-based DAMON interface")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: chongjiapeng <jiapeng.chong@linux.alibaba.com>
Cc: <stable@vger.kernel.org> # 5.18.x
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-23 11:21:30 +01:00
..
damon mm/damon/sysfs: cleanup attrs subdirs on context dir setup failure 2026-01-23 11:21:30 +01:00
kasan kasan: unpoison vms[area] addresses with a common tag 2026-01-08 10:17:10 +01:00
kfence kfence: drop nth_page() usage 2025-09-21 14:22:09 -07:00
kmsan mm: kmsan: fix poisoning of high-order non-compound pages 2026-01-23 11:21:29 +01:00
backing-dev.c fuse update for 6.18 2025-10-03 12:48:18 -07:00
balloon_compaction.c mm/migrate: fix NULL movable_ops if CONFIG_ZSMALLOC=m 2025-08-19 16:35:57 -07:00
bootmem_info.c
cma_debug.c mm: cma: simplify cma_maxchunk_get() 2025-07-24 19:12:36 -07:00
cma_sysfs.c
cma.c mm/cma: refuse handing out non-contiguous page ranges 2025-09-21 14:22:06 -07:00
cma.h
compaction.c mm/compaction: fix low_pfn advance on isolating hugetlb 2025-09-28 11:51:29 -07:00
debug_page_alloc.c
debug_page_ref.c
debug_vm_pgtable.c mm/debug_vm_pgtable: clear page table entries at destroy_args() 2025-08-19 16:35:54 -07:00
debug.c mm: convert core mm to mm_flags_*() accessors 2025-09-13 16:54:56 -07:00
dmapool_test.c
dmapool.c
early_ioremap.c
execmem.c mm: remove PMD alignment constraint in execmem_vmalloc() 2025-09-28 11:51:31 -07:00
fadvise.c
fail_page_alloc.c
failslab.c
filemap.c mm/filemap: fix logic around SIGBUS in filemap_map_pages() 2025-11-24 14:25:18 -08:00
folio-compat.c
gup_test.c
gup_test.h
gup.c mm/gup: fix handling of errors from arch_make_folio_accessible() in follow_page_pte() 2025-09-21 14:22:29 -07:00
highmem.c mm: constify highmem related functions for improved const-correctness 2025-09-21 14:22:15 -07:00
hmm.c dma-mapping updates for Linux 6.18: 2025-10-03 17:41:12 -07:00
huge_memory.c mm/huge_memory: merge uniform_split_supported() and non_uniform_split_supported() 2026-01-08 10:16:41 +01:00
hugetlb_cgroup.c
hugetlb_cma.c mm: hugetlb: directly pass order when allocate a hugetlb folio 2025-09-21 14:22:11 -07:00
hugetlb_cma.h mm: hugetlb: directly pass order when allocate a hugetlb folio 2025-09-21 14:22:11 -07:00
hugetlb_vmemmap.c mm/pagewalk: split walk_page_range_novma() into kernel/user parts 2025-07-09 22:42:05 -07:00
hugetlb_vmemmap.h
hugetlb.c hugetlbfs: move lock assertions after early returns in huge_pmd_unshare() 2025-10-21 15:46:17 -07:00
hwpoison-inject.c mm/hwpoison: decouple hwpoison_filter from mm/memory-failure.c 2025-09-21 14:22:21 -07:00
init-mm.c
internal.h Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
interval_tree.c
ioremap.c
Kconfig x86/kaslr: Recognize all ZONE_DEVICE users as physaddr consumers 2026-01-23 11:21:25 +01:00
Kconfig.debug
khugepaged.c mm/khugepaged: use KMEM_CACHE() 2025-10-03 16:42:44 -07:00
kmemleak.c mm: fix possible deadlock in kmemleak 2025-09-01 17:11:37 -07:00
ksm.c mm/ksm: fix exec/fork inheritance support for prctl 2026-01-02 12:57:11 +01:00
list_lru.c mm, list_lru: refactor the locking code 2025-07-09 22:41:56 -07:00
maccess.c mm: unexport globally copy_to_kernel_nofault 2025-07-09 22:42:22 -07:00
madvise.c mm: clean up is_guard_pte_marker() 2025-10-03 16:42:43 -07:00
Makefile mm: remove unused zpool layer 2025-09-21 14:21:59 -07:00
mapping_dirty_helpers.c mm: remove redundant pXd_devmap calls 2025-07-09 22:42:17 -07:00
memblock.c memblock: fix memblock_estimated_nr_free_pages() for soft-reserved memory 2025-11-11 18:15:35 +02:00
memcontrol-v1.c mm/memcg: v1: account event registrations and drop world-writable cgroup.event_control 2025-09-21 14:22:26 -07:00
memcontrol-v1.h
memcontrol.c memcg: skip cgroup_file_notify if spinning is not allowed 2025-10-07 14:01:11 -07:00
memfd.c mm/memfd: fix information leak in hugetlb folios 2025-11-24 14:25:17 -08:00
memory_hotplug.c mm/memory_hotplug: activate node before adding new memory blocks 2025-10-03 16:42:43 -07:00
memory-failure.c mm, swap: cleanup swap cache API and add kerneldoc 2025-09-21 14:22:23 -07:00
memory-tiers.c mm: re-enable kswapd when memory pressure subsides or demotion is toggled 2025-09-21 14:22:29 -07:00
memory.c mm/memory: do not populate page table entries beyond i_size 2025-11-09 21:19:43 -08:00
mempolicy.c mm: split folio_pte_batch() into folio_pte_batch() and folio_pte_batch_flags() 2025-07-19 18:59:45 -07:00
mempool.c mm/mempool: fix poisoning order>0 pages with HIGHMEM 2025-11-14 17:55:23 +01:00
memremap.c mm/memremap: remove unused get_dev_pagemap() parameter 2025-09-21 14:22:21 -07:00
memtest.c
migrate_device.c treewide: remove MIGRATEPAGE_SUCCESS 2025-09-13 16:54:50 -07:00
migrate.c mm: prevent poison consumption when splitting THP 2025-10-15 13:24:34 -07:00
mincore.c mm, swap: use unified helper for swap cache look up 2025-09-21 14:22:22 -07:00
mlock.c mm: folio_may_be_lru_cached() unless folio_test_large() 2025-09-13 13:05:36 -07:00
mm_init.c mm/mm_init: fix hash table order logging in alloc_large_system_hash() 2025-11-09 21:19:44 -08:00
mm_slot.h
mmap_lock.c mm/mmap_lock: reset maple state on lock_vma_under_rcu() retry 2025-11-24 14:25:17 -08:00
mmap.c mm: specify separate file and vm_file params in vm_area_desc 2025-09-22 20:17:11 -07:00
mmu_gather.c mm: remove redundant __GFP_NOWARN 2025-09-13 16:54:58 -07:00
mmu_notifier.c
mmzone.c mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
mprotect.c mm: pass page directly instead of using folio_page 2025-08-11 23:00:59 -07:00
mremap.c mm/mremap: honour writable bit in mremap pte batching 2025-11-09 21:19:44 -08:00
mseal.c mm/mseal: rework mseal apply logic 2025-08-02 12:06:09 -07:00
msync.c
nommu.c mm/nommu: convert kobjsize() to folios 2025-09-13 16:54:46 -07:00
numa_emulation.c mm: numa,memblock: Use SZ_1M macro to denote bytes to MB conversion 2025-08-20 16:31:23 +03:00
numa_memblks.c mm: numa,memblock: include <asm/numa.h> for 'numa_nodes_parsed' 2026-01-23 11:21:29 +01:00
numa.c
oom_kill.c mm/oom_kill.c: fix inverted check 2025-09-23 14:14:16 -07:00
page_alloc.c mm/page_alloc: make percpu_pagelist_high_fraction reads lock-free 2026-01-23 11:21:29 +01:00
page_counter.c
page_ext.c mm,page_ext: derive the node from the pfn 2025-07-13 16:38:16 -07:00
page_frag_cache.c
page_idle.c
page_io.c mm, swap: tidy up swap device and cluster info helpers 2025-09-21 14:22:23 -07:00
page_isolation.c mm/page_isolation: drop __folio_test_movable() check for large folios 2025-07-13 16:38:29 -07:00
page_owner.c mm/page_owner: fix memory leak in page_owner_stack_fops->release() 2026-01-08 10:17:10 +01:00
page_poison.c
page_reporting.c
page_reporting.h
page_table_check.c
page_vma_mapped.c mm/page_vma_mapped: track if the page is mapped across page table boundary 2025-09-28 11:51:29 -07:00
page-writeback.c fuse update for 6.18 2025-10-03 12:48:18 -07:00
pagewalk.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
percpu-internal.h
percpu-km.c mm/mm/percpu-km: drop nth_page() usage within single allocation 2025-09-21 14:22:04 -07:00
percpu-stats.c mm: remove outdated filename comment in percpu-stats.c 2025-07-13 16:38:23 -07:00
percpu-vm.c
percpu.c percpu: fix race on alloc failed warning limit 2025-09-08 23:45:10 -07:00
pgalloc-track.h
pgtable-generic.c mm: remove redundant pXd_devmap calls 2025-07-09 22:42:17 -07:00
process_vm_access.c
pt_reclaim.c
ptdump.c mm/ptdump: take the memory hotplug lock inside ptdump_walk_pgd() 2025-07-09 22:42:20 -07:00
readahead.c readahead: add trace points 2025-09-21 14:22:28 -07:00
rmap.c mm/rmap: improve mlock tracking for large folios 2025-09-28 11:51:31 -07:00
rodata_test.c
secretmem.c mm/secretmem: fix use-after-free race in fault handler 2025-11-09 21:19:46 -08:00
shmem_quota.c
shmem.c shmem: fix recovery on rename failures 2026-01-02 12:56:37 +01:00
show_mem.c mm: re-enable kswapd when memory pressure subsides or demotion is toggled 2025-09-21 14:22:29 -07:00
shrinker_debug.c
shrinker.c
shuffle.c
shuffle.h
slab_common.c mm/slab: introduce kvfree_rcu_barrier_on_cache() for cache destruction 2026-01-02 12:57:12 +01:00
slab.h mm/slab: introduce kvfree_rcu_barrier_on_cache() for cache destruction 2026-01-02 12:57:12 +01:00
slub.c mm/slub: reset KASAN tag in defer_free() before accessing freed memory 2026-01-02 12:57:18 +01:00
sparse-vmemmap.c mm: introduce and use {pgd,p4d}_populate_kernel() 2025-08-27 22:45:44 -07:00
sparse.c mm: introduce memdesc_nid() 2025-09-13 16:55:07 -07:00
swap_cgroup.c
swap_state.c mm, swap: fix potential UAF issue for VMA readahead 2025-11-15 10:52:02 -08:00
swap_table.h mm, swap: use a single page for swap table when the size fits 2025-09-21 14:22:25 -07:00
swap.c mm: lru_add_drain_all() do local lru_add_drain() first 2025-09-21 14:22:32 -07:00
swap.h mm, swap: implement dynamic allocation of swap table 2025-09-21 14:22:25 -07:00
swapfile.c mm, swap: do not perform synchronous discard during allocation 2026-01-08 10:16:57 +01:00
truncate.c mm/truncate: unmap large folio on split failure 2025-11-09 21:19:43 -08:00
usercopy.c
userfaultfd.c mm, swap: use unified helper for swap cache look up 2025-09-21 14:22:22 -07:00
util.c fsnotify: pass correct offset to fsnotify_mmap_perm() 2025-10-07 14:01:12 -07:00
vma_exec.c mm/vma: use vmg->target to specify target VMA for new VMA merge 2025-07-09 22:42:11 -07:00
vma_init.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
vma_internal.h
vma.c mm: specify separate file and vm_file params in vm_area_desc 2025-09-22 20:17:11 -07:00
vma.h mm: specify separate file and vm_file params in vm_area_desc 2025-09-22 20:17:11 -07:00
vmalloc.c kasan: refactor pcpu kasan vmalloc unpoison 2026-01-08 10:17:09 +01:00
vmpressure.c memcg: convert memcg->socket_pressure to u64 2025-07-24 19:12:32 -07:00
vmscan.c mm: re-enable kswapd when memory pressure subsides or demotion is toggled 2025-09-21 14:22:29 -07:00
vmstat.c mm: re-enable kswapd when memory pressure subsides or demotion is toggled 2025-09-21 14:22:29 -07:00
workingset.c mm: introduce memdesc_flags_t 2025-09-13 16:55:07 -07:00
zpdesc.h mm: zpdesc: minor naming and comment corrections 2025-09-21 14:21:59 -07:00
zsmalloc.c mm: remove unused zpool layer 2025-09-21 14:21:59 -07:00
zswap.c mm/zswap: fix error pointer free in zswap_cpu_comp_prepare() 2026-01-23 11:21:29 +01:00