====================================================== WARNING: possible circular locking dependency detected 5.1.0-rc6+ #164 Not tainted ------------------------------------------------------ syz-executor.4/22868 is trying to acquire lock: 00000000db1d52a6 (console_owner){-.-.}, at: log_next kernel/printk/printk.c:499 [inline] 00000000db1d52a6 (console_owner){-.-.}, at: console_unlock+0x3fc/0xed0 kernel/printk/printk.c:2439 but task is already holding lock: 00000000dee0d093 (&(&pool->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] 00000000dee0d093 (&(&pool->lock)->rlock){-.-.}, at: start_flush_work kernel/workqueue.c:2984 [inline] 00000000dee0d093 (&(&pool->lock)->rlock){-.-.}, at: __flush_work+0x162/0x880 kernel/workqueue.c:3038 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&(&pool->lock)->rlock){-.-.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] __queue_work+0x23d/0x10e0 kernel/workqueue.c:1449 queue_work_on+0x192/0x200 kernel/workqueue.c:1518 queue_work include/linux/workqueue.h:494 [inline] schedule_work include/linux/workqueue.h:552 [inline] put_pwq kernel/workqueue.c:1122 [inline] put_pwq+0x178/0x1d0 kernel/workqueue.c:1107 put_pwq_unlocked.part.0+0x34/0x70 kernel/workqueue.c:1139 put_pwq_unlocked kernel/workqueue.c:1133 [inline] destroy_workqueue+0x623/0x700 kernel/workqueue.c:4383 do_floppy_init drivers/block/floppy.c:4699 [inline] floppy_async_init+0x2031/0x2183 drivers/block/floppy.c:4717 async_run_entry_fn+0x126/0x570 kernel/async.c:127 process_one_work+0x98e/0x1790 kernel/workqueue.c:2269 worker_thread+0x98/0xe40 kernel/workqueue.c:2415 kthread+0x357/0x430 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352 -> #3 (&pool->lock/1){..-.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2f/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] __queue_work+0x23d/0x10e0 kernel/workqueue.c:1449 queue_work_on+0x192/0x200 kernel/workqueue.c:1518 queue_work include/linux/workqueue.h:494 [inline] tty_schedule_flip drivers/tty/tty_buffer.c:413 [inline] tty_flip_buffer_push+0xc5/0x100 drivers/tty/tty_buffer.c:556 pty_write+0x1a6/0x200 drivers/tty/pty.c:125 n_tty_write+0xb06/0x1150 drivers/tty/n_tty.c:2356 do_tty_write drivers/tty/tty_io.c:961 [inline] tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1045 __vfs_write+0x8d/0x110 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0x14f/0x2d0 fs/read_write.c:599 __do_sys_write fs/read_write.c:611 [inline] __se_sys_write fs/read_write.c:608 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:608 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #2 (&(&port->lock)->rlock){-.-.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 tty_port_tty_get+0x22/0x80 drivers/tty/tty_port.c:287 tty_port_default_wakeup+0x16/0x40 drivers/tty/tty_port.c:47 tty_port_tty_wakeup+0x5d/0x70 drivers/tty/tty_port.c:387 uart_write_wakeup+0x46/0x70 drivers/tty/serial/serial_core.c:103 serial8250_tx_chars+0x4a4/0xb20 drivers/tty/serial/8250/8250_port.c:1806 serial8250_handle_irq.part.0+0x1be/0x2e0 drivers/tty/serial/8250/8250_port.c:1879 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1865 [inline] serial8250_default_handle_irq+0xc5/0x150 drivers/tty/serial/8250/8250_port.c:1895 serial8250_interrupt+0xfb/0x1a0 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0x146/0x900 kernel/irq/handle.c:149 handle_irq_event_percpu+0x74/0x160 kernel/irq/handle.c:189 handle_irq_event+0xa7/0x134 kernel/irq/handle.c:206 handle_edge_irq+0x264/0x8e0 kernel/irq/chip.c:822 generic_handle_irq_desc include/linux/irqdesc.h:156 [inline] handle_irq+0x252/0x3d8 arch/x86/kernel/irq_64.c:78 do_IRQ+0x99/0x1d0 arch/x86/kernel/irq.c:246 ret_from_intr+0x0/0x1e native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:57 arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:571 default_idle_call+0x36/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x377/0x560 kernel/sched/idle.c:262 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353 start_secondary+0x360/0x4d0 arch/x86/kernel/smpboot.c:267 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (&port_lock_key){-.-.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 serial8250_console_write+0x253/0x9c0 drivers/tty/serial/8250/8250_port.c:3245 univ8250_console_write+0x5f/0x70 drivers/tty/serial/8250/8250_core.c:586 call_console_drivers kernel/printk/printk.c:1774 [inline] console_unlock+0xb44/0xed0 kernel/printk/printk.c:2452 vprintk_emit+0x280/0x6d0 kernel/printk/printk.c:1975 vprintk_default+0x28/0x30 kernel/printk/printk.c:2002 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:2035 register_console+0x74d/0xb50 kernel/printk/printk.c:2767 univ8250_console_init+0x3e/0x4b drivers/tty/serial/8250/8250_core.c:681 console_init+0x4f7/0x761 kernel/printk/printk.c:2853 start_kernel+0x574/0x84f init/main.c:675 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470 x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #0 (console_owner){-.-.}: check_prevs_add kernel/locking/lockdep.c:2333 [inline] validate_chain kernel/locking/lockdep.c:2714 [inline] __lock_acquire+0x239c/0x3fb0 kernel/locking/lockdep.c:3701 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 console_lock_spinning_enable kernel/printk/printk.c:1637 [inline] console_unlock+0x466/0xed0 kernel/printk/printk.c:2449 vprintk_emit+0x280/0x6d0 kernel/printk/printk.c:1975 vprintk_default+0x28/0x30 kernel/printk/printk.c:2002 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:2035 fail_dump lib/fault-inject.c:44 [inline] should_fail+0x708/0x852 lib/fault-inject.c:149 __should_failslab+0x121/0x190 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1610 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3379 [inline] kmem_cache_alloc+0x47/0x6f0 mm/slab.c:3555 kmem_cache_zalloc include/linux/slab.h:732 [inline] fill_pool lib/debugobjects.c:134 [inline] __debug_object_init+0x755/0xc30 lib/debugobjects.c:379 debug_object_init_on_stack+0x19/0x20 lib/debugobjects.c:446 __init_work kernel/workqueue.c:504 [inline] insert_wq_barrier kernel/workqueue.c:2657 [inline] start_flush_work kernel/workqueue.c:2999 [inline] __flush_work+0x265/0x880 kernel/workqueue.c:3038 flush_work+0x18/0x20 kernel/workqueue.c:3060 flush_all_backlogs net/core/dev.c:5356 [inline] rollback_registered_many+0x61b/0xfd0 net/core/dev.c:8199 rollback_registered+0x109/0x1d0 net/core/dev.c:8256 unregister_netdevice_queue net/core/dev.c:9303 [inline] unregister_netdevice_queue+0x1ee/0x2c0 net/core/dev.c:9296 br_dev_delete+0x145/0x1a0 net/bridge/br_if.c:387 br_del_bridge+0xd7/0x120 net/bridge/br_if.c:487 br_ioctl_deviceless_stub+0x2a4/0x7b0 net/bridge/br_ioctl.c:380 sock_ioctl+0x453/0x790 net/socket.c:1135 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: console_owner --> &pool->lock/1 --> &(&pool->lock)->rlock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&pool->lock)->rlock); lock(&pool->lock/1); lock(&(&pool->lock)->rlock); lock(console_owner); *** DEADLOCK *** 5 locks held by syz-executor.4/22868: #0: 0000000096654470 (br_ioctl_mutex){+.+.}, at: sock_ioctl+0x42d/0x790 net/socket.c:1133 #1: 00000000524e68ca (rtnl_mutex){+.+.}, at: rtnl_lock+0x17/0x20 net/core/rtnetlink.c:76 #2: 00000000e7a0441f (cpu_hotplug_lock.rw_sem){++++}, at: get_online_cpus include/linux/cpu.h:130 [inline] #2: 00000000e7a0441f (cpu_hotplug_lock.rw_sem){++++}, at: flush_all_backlogs net/core/dev.c:5349 [inline] #2: 00000000e7a0441f (cpu_hotplug_lock.rw_sem){++++}, at: rollback_registered_many+0x4f0/0xfd0 net/core/dev.c:8199 #3: 00000000dee0d093 (&(&pool->lock)->rlock){-.-.}, at: spin_lock include/linux/spinlock.h:329 [inline] #3: 00000000dee0d093 (&(&pool->lock)->rlock){-.-.}, at: start_flush_work kernel/workqueue.c:2984 [inline] #3: 00000000dee0d093 (&(&pool->lock)->rlock){-.-.}, at: __flush_work+0x162/0x880 kernel/workqueue.c:3038 #4: 00000000d64653a7 (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1699 [inline] #4: 00000000d64653a7 (console_lock){+.+.}, at: vprintk_emit+0x267/0x6d0 kernel/printk/printk.c:1974 stack backtrace: CPU: 0 PID: 22868 Comm: syz-executor.4 Not tainted 5.1.0-rc6+ #164 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1571 check_prev_add.constprop.0+0xf11/0x23c0 kernel/locking/lockdep.c:2220 check_prevs_add kernel/locking/lockdep.c:2333 [inline] validate_chain kernel/locking/lockdep.c:2714 [inline] __lock_acquire+0x239c/0x3fb0 kernel/locking/lockdep.c:3701 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4211 console_lock_spinning_enable kernel/printk/printk.c:1637 [inline] console_unlock+0x466/0xed0 kernel/printk/printk.c:2449 vprintk_emit+0x280/0x6d0 kernel/printk/printk.c:1975 vprintk_default+0x28/0x30 kernel/printk/printk.c:2002 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:2035 fail_dump lib/fault-inject.c:44 [inline] should_fail+0x708/0x852 lib/fault-inject.c:149 __should_failslab+0x121/0x190 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1610 slab_pre_alloc_hook mm/slab.h:420 [inline] slab_alloc mm/slab.c:3379 [inline] kmem_cache_alloc+0x47/0x6f0 mm/slab.c:3555 kmem_cache_zalloc include/linux/slab.h:732 [inline] fill_pool lib/debugobjects.c:134 [inline] __debug_object_init+0x755/0xc30 lib/debugobjects.c:379 debug_object_init_on_stack+0x19/0x20 lib/debugobjects.c:446 __init_work kernel/workqueue.c:504 [inline] insert_wq_barrier kernel/workqueue.c:2657 [inline] start_flush_work kernel/workqueue.c:2999 [inline] __flush_work+0x265/0x880 kernel/workqueue.c:3038 flush_work+0x18/0x20 kernel/workqueue.c:3060 flush_all_backlogs net/core/dev.c:5356 [inline] rollback_registered_many+0x61b/0xfd0 net/core/dev.c:8199 rollback_registered+0x109/0x1d0 net/core/dev.c:8256 unregister_netdevice_queue net/core/dev.c:9303 [inline] unregister_netdevice_queue+0x1ee/0x2c0 net/core/dev.c:9296 br_dev_delete+0x145/0x1a0 net/bridge/br_if.c:387 br_del_bridge+0xd7/0x120 net/bridge/br_if.c:487 br_ioctl_deviceless_stub+0x2a4/0x7b0 net/bridge/br_ioctl.c:380 sock_ioctl+0x453/0x790 net/socket.c:1135 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:509 [inline] do_vfs_ioctl+0xd6e/0x1390 fs/ioctl.c:696 ksys_ioctl+0xab/0xd0 fs/ioctl.c:713 __do_sys_ioctl fs/ioctl.c:720 [inline] __se_sys_ioctl fs/ioctl.c:718 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:718 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x458da9 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f5a89032c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5a89032c90 RCX: 000000000 Lost 4 message(s)!