============================================================================= ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc4-next-20250702-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor/5834 is trying to acquire lock: ffffffff8e130220 (console_owner){....}-{0:0}, at: console_trylock_spinning kernel/printk/printk.c:2048 [inline] ffffffff8e130220 (console_owner){....}-{0:0}, at: vprintk_emit+0x444/0x7a0 kernel/printk/printk.c:2449 but task is already holding lock: ffff88802ef7e258 (&n->list_lock){-.-.}-{3:3}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] ffff88802ef7e258 (&n->list_lock){-.-.}-{3:3}, at: free_partial mm/slub.c:5897 [inline] ffff88802ef7e258 (&n->list_lock){-.-.}-{3:3}, at: __kmem_cache_shutdown+0xa9/0x250 mm/slub.c:5934 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&n->list_lock){-.-.}-{3:3}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 get_partial_node+0x37/0x390 mm/slub.c:2899 get_partial mm/slub.c:3013 [inline] ___slab_alloc+0xb3f/0x1410 mm/slub.c:3871 __slab_alloc mm/slub.c:3981 [inline] __slab_alloc_node mm/slub.c:4056 [inline] slab_alloc_node mm/slub.c:4217 [inline] kmem_cache_alloc_noprof+0x283/0x3c0 mm/slub.c:4236 kmem_alloc_batch lib/debugobjects.c:371 [inline] fill_pool+0x100/0x570 lib/debugobjects.c:403 debug_objects_fill_pool lib/debugobjects.c:725 [inline] debug_object_activate+0x383/0x420 lib/debugobjects.c:814 debug_work_activate kernel/workqueue.c:668 [inline] insert_work+0x35/0x330 kernel/workqueue.c:2184 __queue_work+0xcd2/0xfb0 kernel/workqueue.c:2342 queue_work_on+0x181/0x270 kernel/workqueue.c:2393 queue_work include/linux/workqueue.h:669 [inline] schedule_work include/linux/workqueue.h:730 [inline] nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:-1 [inline] nsim_fib_event_nb+0xe0d/0x1080 drivers/net/netdevsim/fib.c:1043 notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85 atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:223 call_fib_notifiers+0x31/0x60 net/core/fib_notifier.c:35 call_fib6_entry_notifiers net/ipv6/ip6_fib.c:409 [inline] fib6_add_rt2node+0x15fb/0x33a0 net/ipv6/ip6_fib.c:1252 fib6_add+0x8da/0x18a0 net/ipv6/ip6_fib.c:1535 __ip6_ins_rt net/ipv6/route.c:1352 [inline] ip6_ins_rt+0xc8/0x120 net/ipv6/route.c:1362 __ipv6_ifa_notify+0x63f/0xac0 net/ipv6/addrconf.c:6286 ipv6_ifa_notify net/ipv6/addrconf.c:6325 [inline] addrconf_dad_completed+0x180/0xd60 net/ipv6/addrconf.c:4324 addrconf_dad_work+0xc36/0x14b0 net/ipv6/addrconf.c:-1 process_one_work kernel/workqueue.c:3239 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3322 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3403 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #3 (&pool->lock){-.-.}-{2:2}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 __queue_work+0x809/0xfb0 kernel/workqueue.c:-1 queue_work_on+0x181/0x270 kernel/workqueue.c:2393 queue_work include/linux/workqueue.h:669 [inline] rpm_suspend+0xe54/0x1720 drivers/base/power/runtime.c:673 __pm_runtime_idle+0x12f/0x1a0 drivers/base/power/runtime.c:1112 pm_runtime_put include/linux/pm_runtime.h:547 [inline] __device_attach+0x342/0x400 drivers/base/dd.c:1047 bus_probe_device+0x185/0x260 drivers/base/bus.c:537 device_add+0x7b6/0xb50 drivers/base/core.c:3691 serial_base_port_add+0x2e3/0x410 drivers/tty/serial/serial_base_bus.c:180 serial_core_port_device_add drivers/tty/serial/serial_core.c:3309 [inline] serial_core_register_port+0x367/0x2700 drivers/tty/serial/serial_core.c:3348 serial8250_register_8250_port+0x16db/0x2050 drivers/tty/serial/8250/8250_core.c:829 serial_pnp_probe+0x527/0x790 drivers/tty/serial/8250/8250_pnp.c:480 pnp_device_probe+0x308/0x4c0 drivers/pnp/driver.c:111 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x26a/0x9a0 drivers/base/dd.c:657 __driver_probe_device+0x18c/0x2f0 drivers/base/dd.c:799 driver_probe_device+0x4f/0x430 drivers/base/dd.c:829 __driver_attach+0x452/0x700 drivers/base/dd.c:1215 bus_for_each_dev+0x230/0x2b0 drivers/base/bus.c:370 bus_add_driver+0x345/0x640 drivers/base/bus.c:678 driver_register+0x23a/0x320 drivers/base/driver.c:249 serial8250_init+0xc2/0x1c0 drivers/tty/serial/8250/8250_platform.c:315 do_one_initcall+0x233/0x820 init/main.c:1269 do_initcall_level+0x137/0x1f0 init/main.c:1331 do_initcalls+0x69/0xd0 init/main.c:1347 kernel_init_freeable+0x3d9/0x570 init/main.c:1579 kernel_init+0x1d/0x1d0 init/main.c:1469 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 -> #2 (&dev->power.lock){-.-.}-{3:3}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 __pm_runtime_resume+0x10f/0x180 drivers/base/power/runtime.c:1179 pm_runtime_get include/linux/pm_runtime.h:484 [inline] __uart_start+0x171/0x460 drivers/tty/serial/serial_core.c:149 uart_write+0xdc/0x130 drivers/tty/serial/serial_core.c:636 process_output_block drivers/tty/n_tty.c:561 [inline] n_tty_write+0xd35/0x11d0 drivers/tty/n_tty.c:2377 iterate_tty_write drivers/tty/tty_io.c:1006 [inline] file_tty_write+0x500/0x990 drivers/tty/tty_io.c:1081 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x54b/0xa90 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (&port_lock_key){-.-.}-{3:3}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162 uart_port_lock_irqsave include/linux/serial_core.h:717 [inline] serial8250_console_write+0x17e/0x1ba0 drivers/tty/serial/8250/8250_port.c:3355 console_emit_next_record kernel/printk/printk.c:3138 [inline] console_flush_all+0x728/0xc40 kernel/printk/printk.c:3226 __console_flush_and_unlock kernel/printk/printk.c:3285 [inline] console_unlock+0xc4/0x270 kernel/printk/printk.c:3325 vprintk_emit+0x5b7/0x7a0 kernel/printk/printk.c:2450 _printk+0xcf/0x120 kernel/printk/printk.c:2475 register_console+0xa8b/0xf90 kernel/printk/printk.c:4126 univ8250_console_init+0x52/0x90 drivers/tty/serial/8250/8250_core.c:516 console_init+0x1a1/0x670 kernel/printk/printk.c:4325 start_kernel+0x2cc/0x500 init/main.c:1035 x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:307 x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:288 common_startup_64+0x13e/0x147 -> #0 (console_owner){....}-{0:0}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 console_trylock_spinning kernel/printk/printk.c:2048 [inline] vprintk_emit+0x460/0x7a0 kernel/printk/printk.c:2449 _printk+0xcf/0x120 kernel/printk/printk.c:2475 __slab_bug+0x6e/0xd0 mm/slub.c:1065 slab_bug+0x57/0x80 mm/slub.c:1076 list_slab_objects+0x35/0x1c0 mm/slub.c:5866 free_partial mm/slub.c:5903 [inline] __kmem_cache_shutdown+0xd4/0x250 mm/slub.c:5934 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:523 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x583/0x690 block/bio.c:1764 bch2_fs_fs_io_direct_exit+0x19/0x30 fs/bcachefs/fs-io-direct.c:685 __bch2_fs_free fs/bcachefs/super.c:603 [inline] bch2_fs_release+0x22c/0x830 fs/bcachefs/super.c:667 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22b/0x480 lib/kobject.c:737 deactivate_locked_super+0xb9/0x130 fs/super.c:474 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1417 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:208 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: console_owner --> &pool->lock --> &n->list_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&n->list_lock); lock(&pool->lock); lock(&n->list_lock); lock(console_owner); *** DEADLOCK *** 4 locks held by syz-executor/5834: #0: ffffffff8e890948 (bio_slab_lock){+.+.}-{4:4}, at: bio_put_slab block/bio.c:140 [inline] #0: ffffffff8e890948 (bio_slab_lock){+.+.}-{4:4}, at: bioset_exit+0x44a/0x690 block/bio.c:1764 #1: ffffffff8dfd41f0 (cpu_hotplug_lock){++++}-{0:0}, at: kmem_cache_destroy+0x3e/0x160 mm/slab_common.c:510 #2: ffffffff8e22bc30 (slab_mutex){+.+.}-{4:4}, at: kmem_cache_destroy+0x4c/0x160 mm/slab_common.c:511 #3: ffff88802ef7e258 (&n->list_lock){-.-.}-{3:3}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #3: ffff88802ef7e258 (&n->list_lock){-.-.}-{3:3}, at: free_partial mm/slub.c:5897 [inline] #3: ffff88802ef7e258 (&n->list_lock){-.-.}-{3:3}, at: __kmem_cache_shutdown+0xa9/0x250 mm/slub.c:5934 stack backtrace: CPU: 1 UID: 0 PID: 5834 Comm: syz-executor Not tainted 6.16.0-rc4-next-20250702-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2046 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 console_trylock_spinning kernel/printk/printk.c:2048 [inline] vprintk_emit+0x460/0x7a0 kernel/printk/printk.c:2449 _printk+0xcf/0x120 kernel/printk/printk.c:2475 __slab_bug+0x6e/0xd0 mm/slub.c:1065 slab_bug+0x57/0x80 mm/slub.c:1076 list_slab_objects+0x35/0x1c0 mm/slub.c:5866 free_partial mm/slub.c:5903 [inline] __kmem_cache_shutdown+0xd4/0x250 mm/slub.c:5934 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:523 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x583/0x690 block/bio.c:1764 bch2_fs_fs_io_direct_exit+0x19/0x30 fs/bcachefs/fs-io-direct.c:685 __bch2_fs_free fs/bcachefs/super.c:603 [inline] bch2_fs_release+0x22c/0x830 fs/bcachefs/super.c:667 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22b/0x480 lib/kobject.c:737 deactivate_locked_super+0xb9/0x130 fs/super.c:474 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1417 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:208 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa74098fc57 Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffdf7849da8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007fa740a10925 RCX: 00007fa74098fc57 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffdf7849e60 RBP: 00007ffdf7849e60 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffdf784aef0 R13: 00007fa740a10925 R14: 000000000001aac6 R15: 00007ffdf784af30 BUG bio-1200 (Not tainted): Objects remaining on __kmem_cache_shutdown() ----------------------------------------------------------------------------- Object 0xffff88805d08c000 @offset=0 Object 0xffff88805d08c540 @offset=1344 Object 0xffff88805d08ca80 @offset=2688 Object 0xffff88805d08cfc0 @offset=4032 Slab 0xffffea0001742300 objects=12 used=4 fp=0xffff88805d08d500 flags=0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) ------------[ cut here ]------------ WARNING: mm/slub.c:1171 at __slab_err+0x15/0x20 mm/slub.c:1171, CPU#1: syz-executor/5834 Modules linked in: CPU: 1 UID: 0 PID: 5834 Comm: syz-executor Tainted: G B 6.16.0-rc4-next-20250702-syzkaller #0 PREEMPT(full) Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 RIP: 0010:__slab_err+0x15/0x20 mm/slub.c:1171 Code: 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 e8 bb ff ff ff bf 05 00 00 00 be 01 00 00 00 e8 0c 6c 5b 00 90 <0f> 0b 90 e9 03 38 4a 0a cc 66 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 0018:ffffc900040bfbb0 EFLAGS: 00010093 RAX: ffffffff81836dfa RBX: ffff88805d1cd280 RCX: ffff8880317f5a00 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc900040bfbd0 R08: ffffffff92a69fc7 R09: 1ffffffff254d3f8 R10: dffffc0000000000 R11: fffffbfff254d3f9 R12: ffff88802ef7e288 R13: ffffea0001742300 R14: ffff88802ef7e288 R15: ffff88802ef7e240 FS: 000055557578e500(0000) GS:ffff888125d1d000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000001b30211ff8 CR3: 0000000033558000 CR4: 00000000003526f0 Call Trace: free_partial mm/slub.c:5903 [inline] __kmem_cache_shutdown+0xd4/0x250 mm/slub.c:5934 kmem_cache_destroy+0x76/0x160 mm/slab_common.c:523 bio_put_slab block/bio.c:155 [inline] bioset_exit+0x583/0x690 block/bio.c:1764 bch2_fs_fs_io_direct_exit+0x19/0x30 fs/bcachefs/fs-io-direct.c:685 __bch2_fs_free fs/bcachefs/super.c:603 [inline] bch2_fs_release+0x22c/0x830 fs/bcachefs/super.c:667 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x22b/0x480 lib/kobject.c:737 deactivate_locked_super+0xb9/0x130 fs/super.c:474 cleanup_mnt+0x425/0x4c0 fs/namespace.c:1417 task_work_run+0x1d1/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43 exit_to_user_mode_prepare include/linux/irq-entry-common.h:208 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fa74098fc57 Code: a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 a8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffdf7849da8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007fa740a10925 RCX: 00007fa74098fc57 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffdf7849e60 RBP: 00007ffdf7849e60 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffdf784aef0 R13: 00007fa740a10925 R14: 000000000001aac6 R15: 00007ffdf784af30