bucket 0:20 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:21 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:21 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:22 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:22 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:23 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:23 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:24 gen 0 has wrong data_type: got free, should be journal, fixing bucket 0:24 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:26 gen 0 has wrong data_type: got free, should be btree, fixing bucket 0:26 gen 0 data type btree has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:27 gen 0 has wrong data_type: got btree, should be need_discard, fixing bucket 0:27 gen 0 data type need_discard has wrong dirty_sectors: got 256, should be 0, fixing bucket 0:29 gen 0 has wrong data_type: got free, should be btree, fixing bucket 0:29 gen 0 data type btree has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:32 gen 0 has wrong data_type: got sb, should be btree, fixing bucket 0:34 gen 0 has wrong data_type: got user, should be need_discard, fixing bucket 0:34 gen 0 data type need_discard has wrong dirty_sectors: got 16, should be 0, fixing bucket 0:35 gen 0 has wrong data_type: got free, should be btree, fixing bucket 0:35 gen 0 data type btree has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:38 gen 0 has wrong data_type: got free, should be btree, fixing bucket 0:38 gen 0 data type btree has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:41 gen 0 has wrong data_type: got free, should be btree, fixing bucket 0:41 gen 0 data type btree has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:120 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:120 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:121 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:121 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:122 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:122 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:123 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:123 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:124 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:124 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:125 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:125 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:126 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:126 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing bucket 0:127 gen 0 has wrong data_type: got free, should be sb, fixing bucket 0:127 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing done bcachefs (loop0): going read-write bcachefs (loop0): journal_replay... bcachefs (loop0): bch2_journal_replay(): error erofs_journal_err bcachefs (loop0): bch2_fs_recovery(): error erofs_journal_err bcachefs (loop0): bch2_fs_start(): error starting filesystem erofs_journal_err bcachefs (loop0): shutting down bcachefs (loop0): shutdown complete ============================================================================= ====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Not tainted ------------------------------------------------------ syz.0.0/5319 is trying to acquire lock: ffffffff8e814418 ((console_sem).lock){-...}-{2:2}, at: down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 but task is already holding lock: ffff8880409dbc18 (&n->list_lock){-.-.}-{3:3}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] ffff8880409dbc18 (&n->list_lock){-.-.}-{3:3}, at: free_partial mm/slub.c:5609 [inline] ffff8880409dbc18 (&n->list_lock){-.-.}-{3:3}, at: __kmem_cache_shutdown+0x9c/0x430 mm/slub.c:5647 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&n->list_lock){-.-.}-{3:3}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 get_partial_node+0x37/0x3f0 mm/slub.c:2834 get_any_partial mm/slub.c:2918 [inline] get_partial mm/slub.c:2952 [inline] ___slab_alloc+0xdf1/0x14a0 mm/slub.c:3806 __slab_alloc+0x58/0xa0 mm/slub.c:3916 __slab_alloc_node mm/slub.c:3991 [inline] slab_alloc_node mm/slub.c:4152 [inline] kmem_cache_alloc_noprof+0x268/0x380 mm/slub.c:4171 kmem_alloc_batch lib/debugobjects.c:371 [inline] fill_pool+0x260/0x680 lib/debugobjects.c:403 debug_objects_fill_pool lib/debugobjects.c:725 [inline] debug_object_activate+0x493/0x580 lib/debugobjects.c:814 debug_hrtimer_activate kernel/time/hrtimer.c:455 [inline] debug_activate kernel/time/hrtimer.c:496 [inline] enqueue_hrtimer+0x30/0x3c0 kernel/time/hrtimer.c:1100 __run_hrtimer kernel/time/hrtimer.c:1818 [inline] __hrtimer_run_queues+0x6cb/0xd30 kernel/time/hrtimer.c:1865 hrtimer_interrupt+0x403/0xa40 kernel/time/hrtimer.c:1927 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x110/0x420 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 sized_strscpy+0x9d/0x2b0 lib/string.c:149 __update_page_owner_handle mm/page_owner.c:251 [inline] __set_page_owner+0x285/0x800 mm/page_owner.c:325 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 folio_alloc_mpol_noprof mm/mempolicy.c:2289 [inline] vma_alloc_folio_noprof+0x12b/0x260 mm/mempolicy.c:2324 folio_prealloc+0x2e/0x170 do_cow_fault mm/memory.c:5416 [inline] do_fault mm/memory.c:5528 [inline] do_pte_missing mm/memory.c:4047 [inline] handle_pte_fault mm/memory.c:5889 [inline] __handle_mm_fault+0x20bd/0x70f0 mm/memory.c:6032 handle_mm_fault+0x3e5/0x8d0 mm/memory.c:6201 do_user_addr_fault arch/x86/mm/fault.c:1337 [inline] handle_page_fault arch/x86/mm/fault.c:1480 [inline] exc_page_fault+0x459/0x8b0 arch/x86/mm/fault.c:1538 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 -> #3 (hrtimer_bases.lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 lock_hrtimer_base kernel/time/hrtimer.c:181 [inline] hrtimer_start_range_ns+0xf9/0xfa0 kernel/time/hrtimer.c:1341 hrtimer_start include/linux/hrtimer.h:260 [inline] start_dl_timer+0x36a/0x4e0 kernel/sched/deadline.c:1190 enqueue_dl_entity+0x1056/0x1db0 kernel/sched/deadline.c:2076 dl_server_start+0xe2/0x2a0 kernel/sched/deadline.c:1671 enqueue_task_fair+0x9d7/0xd40 kernel/sched/fair.c:7010 enqueue_task+0x73/0x3d0 kernel/sched/core.c:2069 activate_task kernel/sched/core.c:2116 [inline] wake_up_new_task+0x576/0xc70 kernel/sched/core.c:4878 kernel_clone+0x4ee/0x8e0 kernel/fork.c:2846 user_mode_thread+0x132/0x1a0 kernel/fork.c:2893 rest_init+0x23/0x300 init/main.c:708 start_kernel+0x484/0x510 init/main.c:1099 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:515 x86_64_start_kernel+0x9f/0xa0 arch/x86/kernel/head64.c:496 common_startup_64+0x13e/0x147 -> #2 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598 raw_spin_rq_lock kernel/sched/sched.h:1521 [inline] task_rq_lock+0xc6/0x360 kernel/sched/core.c:700 cgroup_move_task+0x9b/0x5a0 kernel/sched/psi.c:1161 css_set_move_task+0x72e/0x950 kernel/cgroup/cgroup.c:898 cgroup_post_fork+0x256/0x880 kernel/cgroup/cgroup.c:6691 copy_process+0x39e9/0x3d50 kernel/fork.c:2629 kernel_clone+0x226/0x8e0 kernel/fork.c:2815 user_mode_thread+0x132/0x1a0 kernel/fork.c:2893 rest_init+0x23/0x300 init/main.c:708 start_kernel+0x484/0x510 init/main.c:1099 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:515 x86_64_start_kernel+0x9f/0xa0 arch/x86/kernel/head64.c:496 common_startup_64+0x13e/0x147 -> #1 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] try_to_wake_up+0xc2/0x1470 kernel/sched/core.c:4213 up+0x72/0x90 kernel/locking/semaphore.c:191 __up_console_sem kernel/printk/printk.c:343 [inline] __console_unlock+0x123/0x1f0 kernel/printk/printk.c:2869 __console_flush_and_unlock kernel/printk/printk.c:3271 [inline] console_unlock+0x18f/0x3b0 kernel/printk/printk.c:3309 vga_remove_vgacon+0xbe/0xd0 drivers/pci/vgaarb.c:186 virtio_gpu_pci_quirk drivers/gpu/drm/virtio/virtgpu_drv.c:62 [inline] virtio_gpu_probe+0x33f/0x3c0 drivers/gpu/drm/virtio/virtgpu_drv.c:93 virtio_dev_probe+0x931/0xc80 drivers/virtio/virtio.c:341 really_probe+0x2b9/0xad0 drivers/base/dd.c:658 __driver_probe_device+0x1a2/0x390 drivers/base/dd.c:800 driver_probe_device+0x50/0x430 drivers/base/dd.c:830 __driver_attach+0x45f/0x710 drivers/base/dd.c:1216 bus_for_each_dev+0x239/0x2b0 drivers/base/bus.c:370 bus_add_driver+0x346/0x670 drivers/base/bus.c:678 driver_register+0x23a/0x320 drivers/base/driver.c:249 do_one_initcall+0x248/0x870 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x3f/0x80 init/main.c:1335 kernel_init_freeable+0x435/0x5d0 init/main.c:1568 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 ((console_sem).lock){-...}-{2:2}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3906 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 __down_trylock_console_sem+0x109/0x250 kernel/printk/printk.c:326 console_trylock kernel/printk/printk.c:2852 [inline] console_trylock_spinning kernel/printk/printk.c:2009 [inline] vprintk_emit+0x3d7/0xa10 kernel/printk/printk.c:2431 _printk+0xd5/0x120 kernel/printk/printk.c:2457 slab_bug+0x6d/0xc0 mm/slub.c:1028 slab_err+0x130/0x190 mm/slub.c:1129 list_slab_objects mm/slub.c:5580 [inline] free_partial mm/slub.c:5615 [inline] __kmem_cache_shutdown+0x134/0x430 mm/slub.c:5647 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:530 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x54e/0x650 block/bio.c:1662 __bch2_fs_free fs/bcachefs/super.c:594 [inline] bch2_fs_release+0x53a/0x7b0 fs/bcachefs/super.c:624 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 bch2_fs_get_tree+0xdc4/0x1740 fs/bcachefs/fs.c:2299 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: (console_sem).lock --> hrtimer_bases.lock --> &n->list_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&n->list_lock); lock(hrtimer_bases.lock); lock(&n->list_lock); lock((console_sem).lock); *** DEADLOCK *** 4 locks held by syz.0.0/5319: #0: ffffffff8f063128 (bio_slab_lock){+.+.}-{4:4}, at: bio_put_slab block/bio.c:140 [inline] #0: ffffffff8f063128 (bio_slab_lock){+.+.}-{4:4}, at: bioset_exit+0x42f/0x650 block/bio.c:1662 #1: ffffffff8e7d49f0 (cpu_hotplug_lock){++++}-{0:0}, at: kmem_cache_destroy+0x3e/0x160 mm/slab_common.c:517 #2: ffffffff8ea22490 (slab_mutex){+.+.}-{4:4}, at: kmem_cache_destroy+0x4c/0x160 mm/slab_common.c:518 #3: ffff8880409dbc18 (&n->list_lock){-.-.}-{3:3}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #3: ffff8880409dbc18 (&n->list_lock){-.-.}-{3:3}, at: free_partial mm/slub.c:5609 [inline] #3: ffff8880409dbc18 (&n->list_lock){-.-.}-{3:3}, at: __kmem_cache_shutdown+0x9c/0x430 mm/slub.c:5647 stack backtrace: CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2076 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3906 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 __down_trylock_console_sem+0x109/0x250 kernel/printk/printk.c:326 console_trylock kernel/printk/printk.c:2852 [inline] console_trylock_spinning kernel/printk/printk.c:2009 [inline] vprintk_emit+0x3d7/0xa10 kernel/printk/printk.c:2431 _printk+0xd5/0x120 kernel/printk/printk.c:2457 slab_bug+0x6d/0xc0 mm/slub.c:1028 slab_err+0x130/0x190 mm/slub.c:1129 list_slab_objects mm/slub.c:5580 [inline] free_partial mm/slub.c:5615 [inline] __kmem_cache_shutdown+0x134/0x430 mm/slub.c:5647 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:530 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x54e/0x650 block/bio.c:1662 __bch2_fs_free fs/bcachefs/super.c:594 [inline] bch2_fs_release+0x53a/0x7b0 fs/bcachefs/super.c:624 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 bch2_fs_get_tree+0xdc4/0x1740 fs/bcachefs/fs.c:2299 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff48138e58a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff48226fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff48226fef0 RCX: 00007ff48138e58a RDX: 0000400000000000 RSI: 0000400000000040 RDI: 00007ff48226feb0 RBP: 0000400000000000 R08: 00007ff48226fef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000400000000040 R13: 00007ff48226feb0 R14: 000000000000593f R15: 0000400000000380 BUG bio-464 (Not tainted): Objects remaining in bio-464 on __kmem_cache_shutdown() ----------------------------------------------------------------------------- Slab 0xffffea000110e280 objects=12 used=2 fp=0xffff88804438a500 flags=0x4fff00000000240(workingset|head|node=1|zone=1|lastcpupid=0x7ff) CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 slab_err+0x15a/0x190 mm/slub.c:1131 list_slab_objects mm/slub.c:5580 [inline] free_partial mm/slub.c:5615 [inline] __kmem_cache_shutdown+0x134/0x430 mm/slub.c:5647 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:530 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x54e/0x650 block/bio.c:1662 __bch2_fs_free fs/bcachefs/super.c:594 [inline] bch2_fs_release+0x53a/0x7b0 fs/bcachefs/super.c:624 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 bch2_fs_get_tree+0xdc4/0x1740 fs/bcachefs/fs.c:2299 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff48138e58a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff48226fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff48226fef0 RCX: 00007ff48138e58a RDX: 0000400000000000 RSI: 0000400000000040 RDI: 00007ff48226feb0 RBP: 0000400000000000 R08: 00007ff48226fef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000400000000040 R13: 00007ff48226feb0 R14: 000000000000593f R15: 0000400000000380 Object 0xffff88804438a000 @offset=0 Object 0xffff88804438a280 @offset=640 ============================================================================= BUG bio-464 (Tainted: G B ): Objects remaining in bio-464 on __kmem_cache_shutdown() ----------------------------------------------------------------------------- Slab 0xffffea000110e600 objects=12 used=6 fp=0xffff888044398c80 flags=0x4fff00000000240(workingset|head|node=1|zone=1|lastcpupid=0x7ff) CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Tainted: G B 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 slab_err+0x15a/0x190 mm/slub.c:1131 list_slab_objects mm/slub.c:5580 [inline] free_partial mm/slub.c:5615 [inline] __kmem_cache_shutdown+0x134/0x430 mm/slub.c:5647 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:530 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x54e/0x650 block/bio.c:1662 __bch2_fs_free fs/bcachefs/super.c:594 [inline] bch2_fs_release+0x53a/0x7b0 fs/bcachefs/super.c:624 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 bch2_fs_get_tree+0xdc4/0x1740 fs/bcachefs/fs.c:2299 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff48138e58a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff48226fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff48226fef0 RCX: 00007ff48138e58a RDX: 0000400000000000 RSI: 0000400000000040 RDI: 00007ff48226feb0 RBP: 0000400000000000 R08: 00007ff48226fef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000400000000040 R13: 00007ff48226feb0 R14: 000000000000593f R15: 0000400000000380 Object 0xffff888044398f00 @offset=3840 Object 0xffff888044399180 @offset=4480 Object 0xffff888044399400 @offset=5120 Object 0xffff888044399680 @offset=5760 Object 0xffff888044399900 @offset=6400 Object 0xffff888044399b80 @offset=7040 ------------[ cut here ]------------ kmem_cache_destroy bio-464: Slab cache still has objects when called from bio_put_slab block/bio.c:155 [inline] kmem_cache_destroy bio-464: Slab cache still has objects when called from bioset_exit+0x54e/0x650 block/bio.c:1662 WARNING: CPU: 0 PID: 5319 at mm/slab_common.c:533 kmem_cache_destroy+0x153/0x160 mm/slab_common.c:532 Modules linked in: CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Tainted: G B 6.14.0-rc2-syzkaller-00039-g09fbf3d50205 #0 Tainted: [B]=BAD_PAGE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 RIP: 0010:kmem_cache_destroy+0x153/0x160 mm/slab_common.c:532 Code: 3f 18 48 89 de 5b 41 5e 5d e9 f9 2a 14 00 90 48 8b 53 60 48 c7 c7 0f 6e 0a 8e 48 c7 c6 48 6e 0a 8e 48 89 e9 e8 7e 85 79 ff 90 <0f> 0b 90 90 e9 25 ff ff ff 0f 1f 40 00 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc9000d2e7870 EFLAGS: 00010246 RAX: 85c2892ee92d0400 RBX: ffff888041d548c0 RCX: ffff88801cd74880 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffffff84c6b2be R08: ffffffff817ffc22 R09: 1ffff11003f8519a R10: dffffc0000000000 R11: ffffed1003f8519b R12: 00000000000001d0 R13: 1ffff1100a640176 R14: 0000000000000001 R15: ffff88804400af88 FS: 00007ff4822706c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005555913185f8 CR3: 000000004322e000 CR4: 0000000000352ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bio_put_slab block/bio.c:155 [inline] bioset_exit+0x54e/0x650 block/bio.c:1662 __bch2_fs_free fs/bcachefs/super.c:594 [inline] bch2_fs_release+0x53a/0x7b0 fs/bcachefs/super.c:624 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22f/0x480 lib/kobject.c:737 bch2_fs_get_tree+0xdc4/0x1740 fs/bcachefs/fs.c:2299 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff48138e58a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff48226fe68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ff48226fef0 RCX: 00007ff48138e58a RDX: 0000400000000000 RSI: 0000400000000040 RDI: 00007ff48226feb0 RBP: 0000400000000000 R08: 00007ff48226fef0 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000400000000040 R13: 00007ff48226feb0 R14: 000000000000593f R15: 0000400000000380