* [GIT PULL] slab updates for 6.13
@ 2024-11-15 14:22 Vlastimil Babka
2024-11-16 15:32 ` Sasha Levin
0 siblings, 1 reply; 7+ messages in thread
From: Vlastimil Babka @ 2024-11-15 14:22 UTC (permalink / raw)
To: Linus Torvalds
Cc: David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML,
Roman Gushchin, Hyeonggon Yoo
Hi Linus,
please pull the latest slab updates from:
git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.13
One new feature and non-critical fixes (mostly related to debugging).
No conflicts to be expected, AFAIK.
Thanks,
Vlastimil
======================================
- Add new slab_strict_numa boot parameter to enforce per-object memory policies
on top of slab folio policies, for systems where saving cost of remote
accesses is more important than minimizing slab allocation overhead
(Christoph Lameter)
- krealloc() fixes for not violating __GFP_ZERO guarantees on krealloc() when
slub_debug (redzone and object tracking) is enabled (Feng Tang)
- Fix a memory leak in case sysfs registration fails for a slab cache, and also
no longer fail to create the cache in that case (Hyeonggon Yoo)
- Fix handling of detected consistency problems (due to buggy slab user) with
slub_debug enabled, so that it does not cause further list corruption bugs
(yuan.gao)
- Code cleanup and kerneldocs polishing (Zhen Lei, Vlastimil Babka)
----------------------------------------------------------------
Christoph Lameter (1):
SLUB: Add support for per object memory policies
Feng Tang (5):
mm/kasan: Don't store metadata inside kmalloc object when slub_debug_orig_size is on
mm/slub: Move krealloc() and related code to slub.c
mm/slub: Consider kfence case for get_orig_size()
mm/slub: Improve redzone check and zeroing for krealloc()
mm/slub, kunit: Add testcase for krealloc redzone and zeroing
Hyeonggon Yoo (1):
mm/slab: Allow cache creation to proceed even if sysfs registration fails
Vlastimil Babka (2):
mm, slab: add kerneldocs for common SLAB_ flags
Merge branch 'slab/for-6.13/features' into slab/for-next
Zhen Lei (1):
mm/slab: remove duplicate check in create_cache()
yuan.gao (1):
mm/slub: Avoid list corruption when removing a slab from the full list
Documentation/admin-guide/kernel-parameters.txt | 10 ++
Documentation/mm/slub.rst | 9 +
include/linux/slab.h | 60 ++++---
lib/slub_kunit.c | 42 +++++
mm/kasan/generic.c | 7 +-
mm/slab.h | 11 ++
mm/slab_common.c | 101 ++---------
mm/slub.c | 212 +++++++++++++++++++++---
8 files changed, 320 insertions(+), 132 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [GIT PULL] slab updates for 6.13 2024-11-15 14:22 [GIT PULL] slab updates for 6.13 Vlastimil Babka @ 2024-11-16 15:32 ` Sasha Levin 2024-11-16 15:35 ` Sasha Levin 0 siblings, 1 reply; 7+ messages in thread From: Sasha Levin @ 2024-11-16 15:32 UTC (permalink / raw) To: Vlastimil Babka Cc: Linus Torvalds, David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML, Roman Gushchin, Hyeonggon Yoo [ Adding Christian and Al ] On Fri, Nov 15, 2024 at 03:22:30PM +0100, Vlastimil Babka wrote: >Hi Linus, > >please pull the latest slab updates from: > > git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.13 > >One new feature and non-critical fixes (mostly related to debugging). >No conflicts to be expected, AFAIK. After merging the last batch of pull requests which included VFS and SLAB into my linus-next[1] tree I've started seeing consistent boot and runtime failures both on LKFT[2] and KernelCI[3]. I'm going to start bisection, but given the amount of content that went in it might take a day or two. It seems that this is something in the interaction between VFS and SLAB: Boot failures: [ 4.600870] __kmem_cache_create_args(ext4_groupinfo_4k) failed with error -22 [ 4.602001] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc7 #1 [ 4.602644] Hardware name: linux,dummy-virt (DT) [ 4.603346] Call trace: [ 4.603594] dump_backtrace+0x108/0x190 [ 4.604831] show_stack+0x24/0x38 [ 4.605104] dump_stack_lvl+0x40/0xa0 [ 4.605472] dump_stack+0x18/0x28 [ 4.605842] __kmem_cache_create_args+0x21c/0x248 [ 4.606235] ext4_mb_init+0x118/0x720 [ 4.606572] ext4_fill_super+0x1550/0x17d8 [ 4.606890] get_tree_bdev_flags+0x138/0x1d8 [ 4.607279] get_tree_bdev+0x20/0x38 [ 4.607643] ext4_get_tree+0x24/0x38 [ 4.608013] vfs_get_tree+0x3c/0x108 [ 4.608260] do_new_mount+0x154/0x398 [ 4.608622] path_mount+0x258/0x4d0 [ 4.609030] init_mount+0x78/0xc8 [ 4.609434] do_mount_root+0xd4/0x1b0 [ 4.609887] mount_root_generic+0x110/0x308 [ 4.610177] mount_block_root+0x5c/0x78 [ 4.610428] mount_root+0x74/0xa8 [ 4.610662] prepare_namespace+0x8c/0xd8 [ 4.610922] kernel_init_freeable+0x10c/0x160 [ 4.611197] kernel_init+0x2c/0x1c0 [ 4.611437] ret_from_fork+0x10/0x20 [ 4.612106] EXT4-fs: no memory for groupinfo slab cache [ 4.612757] EXT4-fs (vda): failed to initialize mballoc (-12) Runtime failures: __kmem_cache_create_args(ext4_groupinfo_1k) failed with error -22 CPU: 0 UID: 0 PID: 76 Comm: kunit_try_catch Tainted: G N 6.12.0-rc7 #1 Tainted: [N]=TEST Hardware name: ARM-Versatile (Device Tree Support) Call trace: unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x34/0x3c dump_stack_lvl from __kmem_cache_create_args+0x24c/0x2c4 __kmem_cache_create_args from ext4_mb_init+0xf4/0x690 ext4_mb_init from mbt_kunit_init+0x394/0x474 mbt_kunit_init from kunit_try_run_case+0x40/0x1d4 kunit_try_run_case from kunit_generic_run_threadfn_adapter+0x1c/0x34 kunit_generic_run_threadfn_adapter from kthread+0xe0/0x10c kthread from ret_from_fork+0x14/0x28 Exception stack(0xd0981fb0 to 0xd0981ff8) 1fa0: 00000000 00000000 00000000 00000000 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 EXT4-fs: no memory for groupinfo slab cache # test_new_blocks_simple: failed to initialize: -12 ------------[ cut here ]------------ kernel BUG at fs/ext4/mballoc.c:3283! Internal error: Oops - BUG: 0 [#1] PREEMPT ARM Modules linked in: CPU: 0 UID: 0 PID: 77 Comm: kunit_try_catch Tainted: G N 6.12.0-rc7 #1 Tainted: [N]=TEST Hardware name: ARM-Versatile (Device Tree Support) PC is at ext4_mb_release+0x2f4/0x31c LR is at mbt_kunit_exit+0x10/0x80 pc : [<c02239d4>] lr : [<c022e758>] psr: 60000113 sp : d0985f18 ip : d0985f30 fp : 00000000 r10: 00000000 r9 : d0811d50 r8 : c17cc000 r7 : c17cc000 r6 : c16be240 r5 : c1c761c0 r4 : d0811d44 r3 : ffff0fff r2 : 00000000 r1 : c12d3fc0 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 00093177 Table: 00004000 DAC: 00000053 Register r0 information: NULL pointer Register r1 information: non-slab/vmalloc memory Register r2 information: NULL pointer Register r3 information: non-paged memory Register r4 information: 2-page vmalloc region starting at 0xd0810000 allocated at copy_process+0x170/0xdd4 Register r5 information: slab task_struct start c1c761c0 pointer offset 0 size 1728 Register r6 information: slab kmalloc-64 start c16be240 pointer offset 0 size 64 Register r7 information: slab kmalloc-1k start c17cc000 pointer offset 0 size 1024 Register r8 information: slab kmalloc-1k start c17cc000 pointer offset 0 size 1024 Register r9 information: 2-page vmalloc region starting at 0xd0810000 allocated at copy_process+0x170/0xdd4 Register r10 information: NULL pointer Register r11 information: NULL pointer Register r12 information: 2-page vmalloc region starting at 0xd0984000 allocated at copy_process+0x170/0xdd4 Process kunit_try_catch (pid: 77, stack limit = 0x(ptrval)) Stack: (0xd0985f18 to 0xd0986000) 5f00: c1440000 00000000 5f20: c102e680 c1c76638 d0985f68 c0c21734 00000003 00000000 00000004 d0811d44 5f40: c1c761c0 c16be240 d0811c88 c17cc000 d0811d50 00000000 00000000 c022e758 5f60: d0811d44 c1c761c0 c16be240 d0811c88 c039be9c d0811d50 00000000 c0399c0c 5f80: d0811d50 c039beb8 c16bf160 c0044a4c c16bf160 c004496c 00000000 00000000 5fa0: 00000000 00000000 00000000 c000854c 00000000 00000000 00000000 00000000 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 Call trace: ext4_mb_release from mbt_kunit_exit+0x10/0x80 mbt_kunit_exit from kunit_try_run_case_cleanup+0x30/0x3c kunit_try_run_case_cleanup from kunit_generic_run_threadfn_adapter+0x1c/0x34 kunit_generic_run_threadfn_adapter from kthread+0xe0/0x10c kthread from ret_from_fork+0x14/0x28 Exception stack(0xd0985fb0 to 0xd0985ff8) 5fa0: 00000000 00000000 00000000 00000000 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Code: e3a010c9 e3811c0e eb278c81 eaffff5d (e7f001f2) ---[ end trace 0000000000000000 ]--- [1] https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linus-next.git/log/?h=linus-next [2] https://qa-reports.linaro.org/lkft/sashal-linus-next/build/v6.11-15430-gc12cd257292c/testrun/25849362/suite/boot/test/clang-19-lkftconfig/log [3] https://kciapistagingstorage1.file.core.windows.net/early-access/baseline-x86-kcidebug-amd-6738b3dc1a48e7821930a51b/log.txt.gz?sv=2022-11-02&ss=f&srt=sco&sp=r&se=2026-10-18T13:36:18Z&st=2024-10-17T05:36:18Z&spr=https&sig=xFxYOOh5uXJWeN9I3YKAUvpGGQivo89HKZbD78gcxvc%3D -- Thanks, Sasha ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] slab updates for 6.13 2024-11-16 15:32 ` Sasha Levin @ 2024-11-16 15:35 ` Sasha Levin 2024-11-16 20:43 ` Vlastimil Babka 0 siblings, 1 reply; 7+ messages in thread From: Sasha Levin @ 2024-11-16 15:35 UTC (permalink / raw) To: Vlastimil Babka, brauner, viro Cc: Linus Torvalds, David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML, Roman Gushchin, Hyeonggon Yoo [ Obviously I fat-fingered it and didn't add Christian or Al ] On Sat, Nov 16, 2024 at 10:32:23AM -0500, Sasha Levin wrote: >[ Adding Christian and Al ] > >On Fri, Nov 15, 2024 at 03:22:30PM +0100, Vlastimil Babka wrote: >>Hi Linus, >> >>please pull the latest slab updates from: >> >> git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.13 >> >>One new feature and non-critical fixes (mostly related to debugging). >>No conflicts to be expected, AFAIK. > >After merging the last batch of pull requests which included VFS and >SLAB into my linus-next[1] tree I've started seeing consistent boot and >runtime failures both on LKFT[2] and KernelCI[3]. I'm going to start >bisection, but given the amount of content that went in it might take a >day or two. > >It seems that this is something in the interaction between VFS and SLAB: > >Boot failures: > >[ 4.600870] __kmem_cache_create_args(ext4_groupinfo_4k) failed with error -22 >[ 4.602001] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc7 #1 >[ 4.602644] Hardware name: linux,dummy-virt (DT) >[ 4.603346] Call trace: >[ 4.603594] dump_backtrace+0x108/0x190 >[ 4.604831] show_stack+0x24/0x38 >[ 4.605104] dump_stack_lvl+0x40/0xa0 >[ 4.605472] dump_stack+0x18/0x28 >[ 4.605842] __kmem_cache_create_args+0x21c/0x248 >[ 4.606235] ext4_mb_init+0x118/0x720 >[ 4.606572] ext4_fill_super+0x1550/0x17d8 >[ 4.606890] get_tree_bdev_flags+0x138/0x1d8 >[ 4.607279] get_tree_bdev+0x20/0x38 >[ 4.607643] ext4_get_tree+0x24/0x38 >[ 4.608013] vfs_get_tree+0x3c/0x108 >[ 4.608260] do_new_mount+0x154/0x398 >[ 4.608622] path_mount+0x258/0x4d0 >[ 4.609030] init_mount+0x78/0xc8 >[ 4.609434] do_mount_root+0xd4/0x1b0 >[ 4.609887] mount_root_generic+0x110/0x308 >[ 4.610177] mount_block_root+0x5c/0x78 >[ 4.610428] mount_root+0x74/0xa8 >[ 4.610662] prepare_namespace+0x8c/0xd8 >[ 4.610922] kernel_init_freeable+0x10c/0x160 >[ 4.611197] kernel_init+0x2c/0x1c0 >[ 4.611437] ret_from_fork+0x10/0x20 >[ 4.612106] EXT4-fs: no memory for groupinfo slab cache >[ 4.612757] EXT4-fs (vda): failed to initialize mballoc (-12) > >Runtime failures: > >__kmem_cache_create_args(ext4_groupinfo_1k) failed with error -22 >CPU: 0 UID: 0 PID: 76 Comm: kunit_try_catch Tainted: G N 6.12.0-rc7 #1 >Tainted: [N]=TEST >Hardware name: ARM-Versatile (Device Tree Support) >Call trace: > unwind_backtrace from show_stack+0x10/0x14 > show_stack from dump_stack_lvl+0x34/0x3c > dump_stack_lvl from __kmem_cache_create_args+0x24c/0x2c4 > __kmem_cache_create_args from ext4_mb_init+0xf4/0x690 > ext4_mb_init from mbt_kunit_init+0x394/0x474 > mbt_kunit_init from kunit_try_run_case+0x40/0x1d4 > kunit_try_run_case from kunit_generic_run_threadfn_adapter+0x1c/0x34 > kunit_generic_run_threadfn_adapter from kthread+0xe0/0x10c > kthread from ret_from_fork+0x14/0x28 >Exception stack(0xd0981fb0 to 0xd0981ff8) >1fa0: 00000000 00000000 00000000 00000000 >1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 >EXT4-fs: no memory for groupinfo slab cache > # test_new_blocks_simple: failed to initialize: -12 >------------[ cut here ]------------ >kernel BUG at fs/ext4/mballoc.c:3283! >Internal error: Oops - BUG: 0 [#1] PREEMPT ARM >Modules linked in: >CPU: 0 UID: 0 PID: 77 Comm: kunit_try_catch Tainted: G N 6.12.0-rc7 #1 >Tainted: [N]=TEST >Hardware name: ARM-Versatile (Device Tree Support) >PC is at ext4_mb_release+0x2f4/0x31c >LR is at mbt_kunit_exit+0x10/0x80 >pc : [<c02239d4>] lr : [<c022e758>] psr: 60000113 >sp : d0985f18 ip : d0985f30 fp : 00000000 >r10: 00000000 r9 : d0811d50 r8 : c17cc000 >r7 : c17cc000 r6 : c16be240 r5 : c1c761c0 r4 : d0811d44 >r3 : ffff0fff r2 : 00000000 r1 : c12d3fc0 r0 : 00000000 >Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none >Control: 00093177 Table: 00004000 DAC: 00000053 >Register r0 information: NULL pointer >Register r1 information: non-slab/vmalloc memory >Register r2 information: NULL pointer >Register r3 information: non-paged memory >Register r4 information: 2-page vmalloc region starting at 0xd0810000 allocated at copy_process+0x170/0xdd4 >Register r5 information: slab task_struct start c1c761c0 pointer offset 0 size 1728 >Register r6 information: slab kmalloc-64 start c16be240 pointer offset 0 size 64 >Register r7 information: slab kmalloc-1k start c17cc000 pointer offset 0 size 1024 >Register r8 information: slab kmalloc-1k start c17cc000 pointer offset 0 size 1024 >Register r9 information: 2-page vmalloc region starting at 0xd0810000 allocated at copy_process+0x170/0xdd4 >Register r10 information: NULL pointer >Register r11 information: NULL pointer >Register r12 information: 2-page vmalloc region starting at 0xd0984000 allocated at copy_process+0x170/0xdd4 >Process kunit_try_catch (pid: 77, stack limit = 0x(ptrval)) >Stack: (0xd0985f18 to 0xd0986000) >5f00: c1440000 00000000 >5f20: c102e680 c1c76638 d0985f68 c0c21734 00000003 00000000 00000004 d0811d44 >5f40: c1c761c0 c16be240 d0811c88 c17cc000 d0811d50 00000000 00000000 c022e758 >5f60: d0811d44 c1c761c0 c16be240 d0811c88 c039be9c d0811d50 00000000 c0399c0c >5f80: d0811d50 c039beb8 c16bf160 c0044a4c c16bf160 c004496c 00000000 00000000 >5fa0: 00000000 00000000 00000000 c000854c 00000000 00000000 00000000 00000000 >5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 >Call trace: > ext4_mb_release from mbt_kunit_exit+0x10/0x80 > mbt_kunit_exit from kunit_try_run_case_cleanup+0x30/0x3c > kunit_try_run_case_cleanup from kunit_generic_run_threadfn_adapter+0x1c/0x34 > kunit_generic_run_threadfn_adapter from kthread+0xe0/0x10c > kthread from ret_from_fork+0x14/0x28 >Exception stack(0xd0985fb0 to 0xd0985ff8) >5fa0: 00000000 00000000 00000000 00000000 >5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 >Code: e3a010c9 e3811c0e eb278c81 eaffff5d (e7f001f2) >---[ end trace 0000000000000000 ]--- > > >[1] https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linus-next.git/log/?h=linus-next >[2] https://qa-reports.linaro.org/lkft/sashal-linus-next/build/v6.11-15430-gc12cd257292c/testrun/25849362/suite/boot/test/clang-19-lkftconfig/log >[3] https://kciapistagingstorage1.file.core.windows.net/early-access/baseline-x86-kcidebug-amd-6738b3dc1a48e7821930a51b/log.txt.gz?sv=2022-11-02&ss=f&srt=sco&sp=r&se=2026-10-18T13:36:18Z&st=2024-10-17T05:36:18Z&spr=https&sig=xFxYOOh5uXJWeN9I3YKAUvpGGQivo89HKZbD78gcxvc%3D > >-- >Thanks, >Sasha > -- Thanks, Sasha ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] slab updates for 6.13 2024-11-16 15:35 ` Sasha Levin @ 2024-11-16 20:43 ` Vlastimil Babka 2024-11-17 3:41 ` Sasha Levin 0 siblings, 1 reply; 7+ messages in thread From: Vlastimil Babka @ 2024-11-16 20:43 UTC (permalink / raw) To: Sasha Levin, brauner, viro Cc: Linus Torvalds, David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML, Roman Gushchin, Hyeonggon Yoo On 11/16/24 16:35, Sasha Levin wrote: > [ Obviously I fat-fingered it and didn't add Christian or Al ] I have found the problem and looks like I managed to force push an older broken version of a branch, possibly due to switching between two computers. Serves me well for amending in some last minute R-b tags. Doing git diff @{u} to check for unexpected suprirses before pushing the result didn't help this time, either I forgot or was blind. I have deleted the slab-for-6.13 signed tag and pushed the fixed branch only to -next. Thanks a lot Sasha for catching this early and please drop the merge from the for-linus tree. Thanks, Vlastimil > On Sat, Nov 16, 2024 at 10:32:23AM -0500, Sasha Levin wrote: >>[ Adding Christian and Al ] >> >>On Fri, Nov 15, 2024 at 03:22:30PM +0100, Vlastimil Babka wrote: >>>Hi Linus, >>> >>>please pull the latest slab updates from: >>> >>> git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.13 >>> >>>One new feature and non-critical fixes (mostly related to debugging). >>>No conflicts to be expected, AFAIK. >> >>After merging the last batch of pull requests which included VFS and >>SLAB into my linus-next[1] tree I've started seeing consistent boot and >>runtime failures both on LKFT[2] and KernelCI[3]. I'm going to start >>bisection, but given the amount of content that went in it might take a >>day or two. >> >>It seems that this is something in the interaction between VFS and SLAB: >> >>Boot failures: >> >>[ 4.600870] __kmem_cache_create_args(ext4_groupinfo_4k) failed with error -22 >>[ 4.602001] CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0-rc7 #1 >>[ 4.602644] Hardware name: linux,dummy-virt (DT) >>[ 4.603346] Call trace: >>[ 4.603594] dump_backtrace+0x108/0x190 >>[ 4.604831] show_stack+0x24/0x38 >>[ 4.605104] dump_stack_lvl+0x40/0xa0 >>[ 4.605472] dump_stack+0x18/0x28 >>[ 4.605842] __kmem_cache_create_args+0x21c/0x248 >>[ 4.606235] ext4_mb_init+0x118/0x720 >>[ 4.606572] ext4_fill_super+0x1550/0x17d8 >>[ 4.606890] get_tree_bdev_flags+0x138/0x1d8 >>[ 4.607279] get_tree_bdev+0x20/0x38 >>[ 4.607643] ext4_get_tree+0x24/0x38 >>[ 4.608013] vfs_get_tree+0x3c/0x108 >>[ 4.608260] do_new_mount+0x154/0x398 >>[ 4.608622] path_mount+0x258/0x4d0 >>[ 4.609030] init_mount+0x78/0xc8 >>[ 4.609434] do_mount_root+0xd4/0x1b0 >>[ 4.609887] mount_root_generic+0x110/0x308 >>[ 4.610177] mount_block_root+0x5c/0x78 >>[ 4.610428] mount_root+0x74/0xa8 >>[ 4.610662] prepare_namespace+0x8c/0xd8 >>[ 4.610922] kernel_init_freeable+0x10c/0x160 >>[ 4.611197] kernel_init+0x2c/0x1c0 >>[ 4.611437] ret_from_fork+0x10/0x20 >>[ 4.612106] EXT4-fs: no memory for groupinfo slab cache >>[ 4.612757] EXT4-fs (vda): failed to initialize mballoc (-12) >> >>Runtime failures: >> >>__kmem_cache_create_args(ext4_groupinfo_1k) failed with error -22 >>CPU: 0 UID: 0 PID: 76 Comm: kunit_try_catch Tainted: G N 6.12.0-rc7 #1 >>Tainted: [N]=TEST >>Hardware name: ARM-Versatile (Device Tree Support) >>Call trace: >> unwind_backtrace from show_stack+0x10/0x14 >> show_stack from dump_stack_lvl+0x34/0x3c >> dump_stack_lvl from __kmem_cache_create_args+0x24c/0x2c4 >> __kmem_cache_create_args from ext4_mb_init+0xf4/0x690 >> ext4_mb_init from mbt_kunit_init+0x394/0x474 >> mbt_kunit_init from kunit_try_run_case+0x40/0x1d4 >> kunit_try_run_case from kunit_generic_run_threadfn_adapter+0x1c/0x34 >> kunit_generic_run_threadfn_adapter from kthread+0xe0/0x10c >> kthread from ret_from_fork+0x14/0x28 >>Exception stack(0xd0981fb0 to 0xd0981ff8) >>1fa0: 00000000 00000000 00000000 00000000 >>1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >>1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 >>EXT4-fs: no memory for groupinfo slab cache >> # test_new_blocks_simple: failed to initialize: -12 >>------------[ cut here ]------------ >>kernel BUG at fs/ext4/mballoc.c:3283! >>Internal error: Oops - BUG: 0 [#1] PREEMPT ARM >>Modules linked in: >>CPU: 0 UID: 0 PID: 77 Comm: kunit_try_catch Tainted: G N 6.12.0-rc7 #1 >>Tainted: [N]=TEST >>Hardware name: ARM-Versatile (Device Tree Support) >>PC is at ext4_mb_release+0x2f4/0x31c >>LR is at mbt_kunit_exit+0x10/0x80 >>pc : [<c02239d4>] lr : [<c022e758>] psr: 60000113 >>sp : d0985f18 ip : d0985f30 fp : 00000000 >>r10: 00000000 r9 : d0811d50 r8 : c17cc000 >>r7 : c17cc000 r6 : c16be240 r5 : c1c761c0 r4 : d0811d44 >>r3 : ffff0fff r2 : 00000000 r1 : c12d3fc0 r0 : 00000000 >>Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none >>Control: 00093177 Table: 00004000 DAC: 00000053 >>Register r0 information: NULL pointer >>Register r1 information: non-slab/vmalloc memory >>Register r2 information: NULL pointer >>Register r3 information: non-paged memory >>Register r4 information: 2-page vmalloc region starting at 0xd0810000 allocated at copy_process+0x170/0xdd4 >>Register r5 information: slab task_struct start c1c761c0 pointer offset 0 size 1728 >>Register r6 information: slab kmalloc-64 start c16be240 pointer offset 0 size 64 >>Register r7 information: slab kmalloc-1k start c17cc000 pointer offset 0 size 1024 >>Register r8 information: slab kmalloc-1k start c17cc000 pointer offset 0 size 1024 >>Register r9 information: 2-page vmalloc region starting at 0xd0810000 allocated at copy_process+0x170/0xdd4 >>Register r10 information: NULL pointer >>Register r11 information: NULL pointer >>Register r12 information: 2-page vmalloc region starting at 0xd0984000 allocated at copy_process+0x170/0xdd4 >>Process kunit_try_catch (pid: 77, stack limit = 0x(ptrval)) >>Stack: (0xd0985f18 to 0xd0986000) >>5f00: c1440000 00000000 >>5f20: c102e680 c1c76638 d0985f68 c0c21734 00000003 00000000 00000004 d0811d44 >>5f40: c1c761c0 c16be240 d0811c88 c17cc000 d0811d50 00000000 00000000 c022e758 >>5f60: d0811d44 c1c761c0 c16be240 d0811c88 c039be9c d0811d50 00000000 c0399c0c >>5f80: d0811d50 c039beb8 c16bf160 c0044a4c c16bf160 c004496c 00000000 00000000 >>5fa0: 00000000 00000000 00000000 c000854c 00000000 00000000 00000000 00000000 >>5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >>5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000 >>Call trace: >> ext4_mb_release from mbt_kunit_exit+0x10/0x80 >> mbt_kunit_exit from kunit_try_run_case_cleanup+0x30/0x3c >> kunit_try_run_case_cleanup from kunit_generic_run_threadfn_adapter+0x1c/0x34 >> kunit_generic_run_threadfn_adapter from kthread+0xe0/0x10c >> kthread from ret_from_fork+0x14/0x28 >>Exception stack(0xd0985fb0 to 0xd0985ff8) >>5fa0: 00000000 00000000 00000000 00000000 >>5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 >>5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 >>Code: e3a010c9 e3811c0e eb278c81 eaffff5d (e7f001f2) >>---[ end trace 0000000000000000 ]--- >> >> >>[1] https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linus-next.git/log/?h=linus-next >>[2] https://qa-reports.linaro.org/lkft/sashal-linus-next/build/v6.11-15430-gc12cd257292c/testrun/25849362/suite/boot/test/clang-19-lkftconfig/log >>[3] https://kciapistagingstorage1.file.core.windows.net/early-access/baseline-x86-kcidebug-amd-6738b3dc1a48e7821930a51b/log.txt.gz?sv=2022-11-02&ss=f&srt=sco&sp=r&se=2026-10-18T13:36:18Z&st=2024-10-17T05:36:18Z&spr=https&sig=xFxYOOh5uXJWeN9I3YKAUvpGGQivo89HKZbD78gcxvc%3D >> >>-- >>Thanks, >>Sasha >> > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] slab updates for 6.13 2024-11-16 20:43 ` Vlastimil Babka @ 2024-11-17 3:41 ` Sasha Levin 2024-11-17 12:56 ` Xiongwei Song 0 siblings, 1 reply; 7+ messages in thread From: Sasha Levin @ 2024-11-17 3:41 UTC (permalink / raw) To: Vlastimil Babka Cc: brauner, viro, Linus Torvalds, David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML, Roman Gushchin, Hyeonggon Yoo On Sat, Nov 16, 2024 at 09:43:07PM +0100, Vlastimil Babka wrote: >On 11/16/24 16:35, Sasha Levin wrote: >> [ Obviously I fat-fingered it and didn't add Christian or Al ] > >I have found the problem and looks like I managed to force push an older >broken version of a branch, possibly due to switching between two computers. >Serves me well for amending in some last minute R-b tags. Doing git diff >@{u} to check for unexpected suprirses before pushing the result didn't help >this time, either I forgot or was blind. > >I have deleted the slab-for-6.13 signed tag and pushed the fixed branch only >to -next. Thanks a lot Sasha for catching this early and please drop the >merge from the for-linus tree. I've dropped the merge and tests are passing now, thanks! -- Thanks, Sasha ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] slab updates for 6.13 2024-11-17 3:41 ` Sasha Levin @ 2024-11-17 12:56 ` Xiongwei Song 2024-11-17 21:01 ` Vlastimil Babka 0 siblings, 1 reply; 7+ messages in thread From: Xiongwei Song @ 2024-11-17 12:56 UTC (permalink / raw) To: Sasha Levin Cc: Vlastimil Babka, brauner, viro, Linus Torvalds, David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML, Roman Gushchin, Hyeonggon Yoo It seems there is a conflict between fc0eac57d08c ("slab: pull kmem_cache_open() into do_kmem_cache_create()") and 543c5bde72e9 ("mm/slab: Allow cache creation to proceed even if sysfs registration fails"). The err is initialized to -EINVAL in the entry of do_kmem_cache_create(), sysfs_slab_add() call can assign a value to err normally, but the assignment to err variable has been removed in Hyeonggon's patch, so do_kmem_cache_create() returns -EINVAL normally. We probably can do the following fix: diff --git a/mm/slub.c b/mm/slub.c index 73eea67a306b..19630a2da8e1 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -6199,9 +6199,11 @@ int do_kmem_cache_create(struct kmem_cache *s, const char *name, if (!alloc_kmem_cache_cpus(s)) goto out; + /* The error code is not needed any more. */ + err = 0; + /* Mutex is not taken during early boot */ if (slab_state <= UP) { - err = 0; goto out; } Regards, Xiongwei On Sun, Nov 17, 2024 at 11:42 AM Sasha Levin <sashal@kernel.org> wrote: > > On Sat, Nov 16, 2024 at 09:43:07PM +0100, Vlastimil Babka wrote: > >On 11/16/24 16:35, Sasha Levin wrote: > >> [ Obviously I fat-fingered it and didn't add Christian or Al ] > > > >I have found the problem and looks like I managed to force push an older > >broken version of a branch, possibly due to switching between two computers. > >Serves me well for amending in some last minute R-b tags. Doing git diff > >@{u} to check for unexpected suprirses before pushing the result didn't help > >this time, either I forgot or was blind. > > > >I have deleted the slab-for-6.13 signed tag and pushed the fixed branch only > >to -next. Thanks a lot Sasha for catching this early and please drop the > >merge from the for-linus tree. > > I've dropped the merge and tests are passing now, thanks! > > -- > Thanks, > Sasha > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] slab updates for 6.13 2024-11-17 12:56 ` Xiongwei Song @ 2024-11-17 21:01 ` Vlastimil Babka 0 siblings, 0 replies; 7+ messages in thread From: Vlastimil Babka @ 2024-11-17 21:01 UTC (permalink / raw) To: Xiongwei Song, Sasha Levin Cc: brauner, viro, Linus Torvalds, David Rientjes, Christoph Lameter, Andrew Morton, linux-mm, LKML, Roman Gushchin, Hyeonggon Yoo On 11/17/24 13:56, Xiongwei Song wrote: > It seems there is a conflict between fc0eac57d08c ("slab: pull kmem_cache_open() > into do_kmem_cache_create()") and 543c5bde72e9 ("mm/slab: Allow cache creation > to proceed even if sysfs registration fails"). The err is initialized No conflict, commit fc0eac57d08c is from 6.12-rc1, there's no merge here. I've introduced the bug by trying to improve Hyeonggon's patch and he quickly corrected me [1] so the buggy version never even made it to -next. But here I managed to resurrect it before the git pull. [1] https://lore.kernel.org/all/195242b4-5471-419a-a350-08fd246973f0@suse.cz/ > to -EINVAL in > the entry of do_kmem_cache_create(), sysfs_slab_add() call can assign > a value to > err normally, but the assignment to err variable has been removed in > Hyeonggon's > patch, so do_kmem_cache_create() returns -EINVAL normally. We probably can do > the following fix: > > diff --git a/mm/slub.c b/mm/slub.c > index 73eea67a306b..19630a2da8e1 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -6199,9 +6199,11 @@ int do_kmem_cache_create(struct kmem_cache *s, > const char *name, > if (!alloc_kmem_cache_cpus(s)) > goto out; > > + /* The error code is not needed any more. */ > + err = 0; > + > /* Mutex is not taken during early boot */ > if (slab_state <= UP) { > - err = 0; That was indeed the fix. > goto out; > } > > Regards, > Xiongwei > > On Sun, Nov 17, 2024 at 11:42 AM Sasha Levin <sashal@kernel.org> wrote: >> >> On Sat, Nov 16, 2024 at 09:43:07PM +0100, Vlastimil Babka wrote: >> >On 11/16/24 16:35, Sasha Levin wrote: >> >> [ Obviously I fat-fingered it and didn't add Christian or Al ] >> > >> >I have found the problem and looks like I managed to force push an older >> >broken version of a branch, possibly due to switching between two computers. >> >Serves me well for amending in some last minute R-b tags. Doing git diff >> >@{u} to check for unexpected suprirses before pushing the result didn't help >> >this time, either I forgot or was blind. >> > >> >I have deleted the slab-for-6.13 signed tag and pushed the fixed branch only >> >to -next. Thanks a lot Sasha for catching this early and please drop the >> >merge from the for-linus tree. >> >> I've dropped the merge and tests are passing now, thanks! >> >> -- >> Thanks, >> Sasha >> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-11-17 21:02 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-11-15 14:22 [GIT PULL] slab updates for 6.13 Vlastimil Babka 2024-11-16 15:32 ` Sasha Levin 2024-11-16 15:35 ` Sasha Levin 2024-11-16 20:43 ` Vlastimil Babka 2024-11-17 3:41 ` Sasha Levin 2024-11-17 12:56 ` Xiongwei Song 2024-11-17 21:01 ` Vlastimil Babka
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox