https://github.com/torvalds/linux
Revision 2127d22509aec3a83dffb2a3c736df7ba747a7ce authored by Miaohe Lin on 18 October 2021, 22:15:52 UTC, committed by Linus Torvalds on 19 October 2021, 06:22:03 UTC
Patch series "Fixups for slub".

This series contains various bug fixes for slub.  We fix memoryleak,
use-afer-free, NULL pointer dereferencing and so on in slub.  More
details can be found in the respective changelogs.

This patch (of 5):

It's possible that __seq_open_private() will return NULL.  So we should
check it before using lest dereferencing NULL pointer.  And in error
paths, we forgot to release private buffer via seq_release_private().
Memory will leak in these paths.

Link: https://lkml.kernel.org/r/20210916123920.48704-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20210916123920.48704-2-linmiaohe@huawei.com
Fixes: 64dd68497be7 ("mm: slub: move sysfs slab alloc/free interfaces to debugfs")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Faiyaz Mohammed <faiyazm@codeaurora.org>
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Bharata B Rao <bharata@linux.ibm.com>
Cc: Roman Gushchin <guro@fb.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 6d2aec9
History
Tip revision: 2127d22509aec3a83dffb2a3c736df7ba747a7ce authored by Miaohe Lin on 18 October 2021, 22:15:52 UTC
mm, slub: fix two bugs in slab_debug_trace_open()
Tip revision: 2127d22
File Mode Size
damon
kasan
kfence
Kconfig -rw-r--r-- 28.3 KB
Kconfig.debug -rw-r--r-- 5.6 KB
Makefile -rw-r--r-- 4.7 KB
backing-dev.c -rw-r--r-- 27.3 KB
balloon_compaction.c -rw-r--r-- 8.2 KB
bootmem_info.c -rw-r--r-- 3.4 KB
cleancache.c -rw-r--r-- 9.8 KB
cma.c -rw-r--r-- 15.4 KB
cma.h -rw-r--r-- 1.4 KB
cma_debug.c -rw-r--r-- 4.5 KB
cma_sysfs.c -rw-r--r-- 2.4 KB
compaction.c -rw-r--r-- 83.5 KB
debug.c -rw-r--r-- 8.2 KB
debug_page_ref.c -rw-r--r-- 1.4 KB
debug_vm_pgtable.c -rw-r--r-- 38.0 KB
dmapool.c -rw-r--r-- 13.6 KB
early_ioremap.c -rw-r--r-- 6.7 KB
fadvise.c -rw-r--r-- 5.3 KB
failslab.c -rw-r--r-- 1.4 KB
filemap.c -rw-r--r-- 111.4 KB
frontswap.c -rw-r--r-- 14.2 KB
gup.c -rw-r--r-- 86.0 KB
gup_test.c -rw-r--r-- 5.6 KB
gup_test.h -rw-r--r-- 938 bytes
highmem.c -rw-r--r-- 19.4 KB
hmm.c -rw-r--r-- 16.7 KB
huge_memory.c -rw-r--r-- 85.5 KB
hugetlb.c -rw-r--r-- 176.8 KB
hugetlb_cgroup.c -rw-r--r-- 21.5 KB
hugetlb_vmemmap.c -rw-r--r-- 13.0 KB
hugetlb_vmemmap.h -rw-r--r-- 1.1 KB
hwpoison-inject.c -rw-r--r-- 2.6 KB
init-mm.c -rw-r--r-- 1.6 KB
internal.h -rw-r--r-- 20.8 KB
interval_tree.c -rw-r--r-- 3.1 KB
io-mapping.c -rw-r--r-- 993 bytes
ioremap.c -rw-r--r-- 1.2 KB
khugepaged.c -rw-r--r-- 59.3 KB
kmemleak.c -rw-r--r-- 56.5 KB
ksm.c -rw-r--r-- 88.4 KB
list_lru.c -rw-r--r-- 14.1 KB
maccess.c -rw-r--r-- 9.1 KB
madvise.c -rw-r--r-- 32.4 KB
mapping_dirty_helpers.c -rw-r--r-- 10.5 KB
memblock.c -rw-r--r-- 60.1 KB
memcontrol.c -rw-r--r-- 192.2 KB
memfd.c -rw-r--r-- 7.9 KB
memory-failure.c -rw-r--r-- 58.9 KB
memory.c -rw-r--r-- 148.3 KB
memory_hotplug.c -rw-r--r-- 66.2 KB
mempolicy.c -rw-r--r-- 74.8 KB
mempool.c -rw-r--r-- 15.9 KB
memremap.c -rw-r--r-- 14.4 KB
memtest.c -rw-r--r-- 2.8 KB
migrate.c -rw-r--r-- 86.0 KB
mincore.c -rw-r--r-- 7.0 KB
mlock.c -rw-r--r-- 22.4 KB
mm_init.c -rw-r--r-- 5.3 KB
mmap.c -rw-r--r-- 101.7 KB
mmap_lock.c -rw-r--r-- 6.2 KB
mmu_gather.c -rw-r--r-- 8.5 KB
mmu_notifier.c -rw-r--r-- 35.0 KB
mmzone.c -rw-r--r-- 2.2 KB
mprotect.c -rw-r--r-- 17.7 KB
mremap.c -rw-r--r-- 27.8 KB
msync.c -rw-r--r-- 2.8 KB
nommu.c -rw-r--r-- 44.5 KB
oom_kill.c -rw-r--r-- 31.5 KB
page-writeback.c -rw-r--r-- 86.7 KB
page_alloc.c -rw-r--r-- 262.5 KB
page_counter.c -rw-r--r-- 6.8 KB
page_ext.c -rw-r--r-- 11.1 KB
page_idle.c -rw-r--r-- 5.2 KB
page_io.c -rw-r--r-- 11.2 KB
page_isolation.c -rw-r--r-- 9.2 KB
page_owner.c -rw-r--r-- 15.9 KB
page_poison.c -rw-r--r-- 2.5 KB
page_reporting.c -rw-r--r-- 10.3 KB
page_reporting.h -rw-r--r-- 1.6 KB
page_vma_mapped.c -rw-r--r-- 8.7 KB
pagewalk.c -rw-r--r-- 15.5 KB
percpu-internal.h -rw-r--r-- 6.6 KB
percpu-km.c -rw-r--r-- 3.2 KB
percpu-stats.c -rw-r--r-- 5.9 KB
percpu-vm.c -rw-r--r-- 11.7 KB
percpu.c -rw-r--r-- 100.9 KB
pgalloc-track.h -rw-r--r-- 1.3 KB
pgtable-generic.c -rw-r--r-- 5.6 KB
process_vm_access.c -rw-r--r-- 8.2 KB
ptdump.c -rw-r--r-- 4.0 KB
readahead.c -rw-r--r-- 19.5 KB
rmap.c -rw-r--r-- 67.9 KB
rodata_test.c -rw-r--r-- 1.3 KB
secretmem.c -rw-r--r-- 5.5 KB
shmem.c -rw-r--r-- 107.8 KB
shuffle.c -rw-r--r-- 4.7 KB
shuffle.h -rw-r--r-- 1.2 KB
slab.c -rw-r--r-- 106.5 KB
slab.h -rw-r--r-- 17.3 KB
slab_common.c -rw-r--r-- 33.3 KB
slob.c -rw-r--r-- 18.2 KB
slub.c -rw-r--r-- 152.9 KB
sparse-vmemmap.c -rw-r--r-- 15.7 KB
sparse.c -rw-r--r-- 26.0 KB
swap.c -rw-r--r-- 31.6 KB
swap_cgroup.c -rw-r--r-- 5.1 KB
swap_slots.c -rw-r--r-- 9.2 KB
swap_state.c -rw-r--r-- 24.0 KB
swapfile.c -rw-r--r-- 96.4 KB
truncate.c -rw-r--r-- 25.0 KB
usercopy.c -rw-r--r-- 9.5 KB
userfaultfd.c -rw-r--r-- 17.6 KB
util.c -rw-r--r-- 26.6 KB
vmacache.c -rw-r--r-- 2.7 KB
vmalloc.c -rw-r--r-- 100.2 KB
vmpressure.c -rw-r--r-- 13.8 KB
vmscan.c -rw-r--r-- 133.4 KB
vmstat.c -rw-r--r-- 54.2 KB
workingset.c -rw-r--r-- 21.4 KB
z3fold.c -rw-r--r-- 47.0 KB
zbud.c -rw-r--r-- 18.4 KB
zpool.c -rw-r--r-- 11.5 KB
zsmalloc.c -rw-r--r-- 61.0 KB
zswap.c -rw-r--r-- 38.9 KB

back to top