Warning: Permanently added '10.128.0.150' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 43.596681][ T7021] IPVS: ftp: loaded support on port[0] = 21 [ 43.632105][ T7021] ttyprintk ttyprintk: tty_port_close_start: tty->count = 1 port count = 2 [ 43.641496][ C0] [ 43.641498][ C0] ====================================================== [ 43.641500][ C0] WARNING: possible circular locking dependency detected [ 43.641502][ C0] 5.7.0-rc1-syzkaller #0 Not tainted [ 43.641504][ C0] ------------------------------------------------------ [ 43.641505][ C0] syz-executor225/7021 is trying to acquire lock: [ 43.641507][ C0] ffffffff892e6a30 (console_owner){-...}-{0:0}, at: console_lock_spinning_enable+0x2d/0x60 [ 43.641512][ C0] [ 43.641514][ C0] but task is already holding lock: [ 43.641515][ C0] ffffffff8c07fb60 (&port->lock#2){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 43.641520][ C0] [ 43.641522][ C0] which lock already depends on the new lock. [ 43.641523][ C0] [ 43.641524][ C0] [ 43.641525][ C0] the existing dependency chain (in reverse order) is: [ 43.641526][ C0] [ 43.641527][ C0] -> #2 (&port->lock#2){-.-.}-{2:2}: [ 43.641532][ C0] lock_acquire+0x169/0x480 [ 43.641534][ C0] _raw_spin_lock_irqsave+0x9e/0xc0 [ 43.641535][ C0] tty_port_tty_get+0x21/0xe0 [ 43.641537][ C0] tty_port_default_wakeup+0x11/0x40 [ 43.641538][ C0] serial8250_tx_chars+0x5ea/0x800 [ 43.641540][ C0] serial8250_handle_irq+0x2fd/0x3e0 [ 43.641541][ C0] serial8250_default_handle_irq+0xac/0x190 [ 43.641543][ C0] serial8250_interrupt+0x93/0x180 [ 43.641544][ C0] __handle_irq_event_percpu+0x1b7/0x610 [ 43.641546][ C0] handle_irq_event+0xbd/0x280 [ 43.641547][ C0] handle_edge_irq+0x245/0xbf0 [ 43.641548][ C0] do_IRQ+0xf6/0x1d0 [ 43.641550][ C0] ret_from_intr+0x0/0x2b [ 43.641551][ C0] _raw_spin_unlock_irqrestore+0xa5/0xd0 [ 43.641553][ C0] uart_write+0x7d3/0x9c0 [ 43.641554][ C0] do_output_char+0x63b/0x940 [ 43.641555][ C0] n_tty_write+0xd5c/0x1170 [ 43.641556][ C0] tty_write+0x593/0x940 [ 43.641558][ C0] do_iter_write+0x402/0x540 [ 43.641559][ C0] do_writev+0x23f/0x4a0 [ 43.641560][ C0] do_syscall_64+0xf3/0x1b0 [ 43.641562][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 43.641563][ C0] [ 43.641564][ C0] -> #1 (&port->lock){-.-.}-{2:2}: [ 43.641568][ C0] lock_acquire+0x169/0x480 [ 43.641570][ C0] _raw_spin_lock_irqsave+0x9e/0xc0 [ 43.641571][ C0] serial8250_console_write+0x13e/0xd50 [ 43.641573][ C0] console_unlock+0x90c/0xec0 [ 43.641574][ C0] vprintk_emit+0x1f8/0x3c0 [ 43.641575][ C0] printk+0x62/0x83 [ 43.641577][ C0] register_console+0xb64/0xed0 [ 43.641578][ C0] univ8250_console_init+0x41/0x43 [ 43.641579][ C0] console_init+0x52/0x97 [ 43.641581][ C0] start_kernel+0x421/0x76f [ 43.641582][ C0] secondary_startup_64+0xa4/0xb0 [ 43.641583][ C0] [ 43.641584][ C0] -> #0 (console_owner){-...}-{0:0}: [ 43.641588][ C0] validate_chain+0x1b09/0x8920 [ 43.641590][ C0] __lock_acquire+0x116c/0x2c30 [ 43.641591][ C0] lock_acquire+0x169/0x480 [ 43.641593][ C0] console_lock_spinning_enable+0x52/0x60 [ 43.641594][ C0] console_unlock+0x73f/0xec0 [ 43.641595][ C0] vprintk_emit+0x1f8/0x3c0 [ 43.641597][ C0] printk+0x62/0x83 [ 43.641598][ C0] tty_port_close_start+0x3c8/0x550 [ 43.641599][ C0] tty_port_close+0x25/0x140 [ 43.641601][ C0] tty_release+0x40a/0x1100 [ 43.641602][ C0] __fput+0x2ed/0x750 [ 43.641603][ C0] task_work_run+0x147/0x1d0 [ 43.641605][ C0] prepare_exit_to_usermode+0x48e/0x600 [ 43.641607][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 43.641607][ C0] [ 43.641609][ C0] other info that might help us debug this: [ 43.641610][ C0] [ 43.641611][ C0] Chain exists of: [ 43.641612][ C0] console_owner --> &port->lock --> &port->lock#2 [ 43.641618][ C0] [ 43.641619][ C0] Possible unsafe locking scenario: [ 43.641620][ C0] [ 43.641622][ C0] CPU0 CPU1 [ 43.641623][ C0] ---- ---- [ 43.641624][ C0] lock(&port->lock#2); [ 43.641628][ C0] lock(&port->lock); [ 43.641631][ C0] lock(&port->lock#2); [ 43.641634][ C0] lock(console_owner); [ 43.641636][ C0] [ 43.641638][ C0] *** DEADLOCK *** [ 43.641638][ C0] [ 43.641640][ C0] 3 locks held by syz-executor225/7021: [ 43.641641][ C0] #0: ffff8880a6d031c0 (&tty->legacy_mutex){+.+.}-{3:3}, at: tty_release+0xb3/0x1100 [ 43.641646][ C0] #1: ffffffff8c07fb60 (&port->lock#2){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 43.641653][ C0] #2: ffffffff892e6910 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x1db/0x3c0 [ 43.641658][ C0] [ 43.641659][ C0] stack backtrace: [ 43.641661][ C0] CPU: 0 PID: 7021 Comm: syz-executor225 Not tainted 5.7.0-rc1-syzkaller #0 [ 43.641664][ C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 43.641665][ C0] Call Trace: [ 43.641666][ C0] dump_stack+0x1e9/0x30e [ 43.641667][ C0] print_circular_bug+0xc72/0xea0 [ 43.641669][ C0] ? stack_trace_save+0xad/0x150 [ 43.641670][ C0] ? save_trace+0x49/0xb60 [ 43.641671][ C0] check_noncircular+0x1fb/0x3a0 [ 43.641673][ C0] validate_chain+0x1b09/0x8920 [ 43.641674][ C0] ? mark_lock+0x102/0x1b00 [ 43.641675][ C0] ? put_dec_trunc8+0x19a/0x290 [ 43.641676][ C0] ? number+0xf14/0x1190 [ 43.641678][ C0] __lock_acquire+0x116c/0x2c30 [ 43.641679][ C0] ? sprintf+0x71/0x90 [ 43.641680][ C0] lock_acquire+0x169/0x480 [ 43.641682][ C0] ? console_lock_spinning_enable+0x2d/0x60 [ 43.641683][ C0] console_lock_spinning_enable+0x52/0x60 [ 43.641685][ C0] ? console_lock_spinning_enable+0x2d/0x60 [ 43.641686][ C0] console_unlock+0x73f/0xec0 [ 43.641687][ C0] ? __down_trylock_console_sem+0x178/0x1b0 [ 43.641689][ C0] ? vprintk_emit+0x1db/0x3c0 [ 43.641690][ C0] ? vprintk_emit+0x1db/0x3c0 [ 43.641691][ C0] vprintk_emit+0x1f8/0x3c0 [ 43.641692][ C0] printk+0x62/0x83 [ 43.641693][ C0] ? _raw_spin_lock_irqsave+0xaa/0xc0 [ 43.641695][ C0] tty_port_close_start+0x3c8/0x550 [ 43.641696][ C0] tty_port_close+0x25/0x140 [ 43.641697][ C0] ? tpk_open+0x60/0x60 [ 43.641698][ C0] tty_release+0x40a/0x1100 [ 43.641700][ C0] ? ima_file_free+0xea/0x3b0 [ 43.641701][ C0] ? tty_release_struct+0xd0/0xd0 [ 43.641702][ C0] __fput+0x2ed/0x750 [ 43.641703][ C0] task_work_run+0x147/0x1d0 [ 43.641705][ C0] prepare_exit_to_usermode+0x48e/0x600 [ 43.641706][ C0] ? syscall_return_slowpath+0xf9/0x420 [ 43.641708][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 43.641709][ C0] RIP: 0033:0x4055b1 [ 43.641713][ C0] Code: 75 14 b8 03 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 04 19 00 00 c3 48 83 ec 08 e8 6a fc ff ff 48 89 04 24 b8 03 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 b3 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01 [ 43.641715][ C0] RSP: 002b:00007ffe0ab16b60 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 [ 43.641718][ C0] RAX: 0000000000000000 RBX: 00007ffe0ab16b90 RCX: 00000000004055b1 [ 43.641720][ C0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 [ 43.641722][ C0] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 [ 43.641724][ C0] R10: 00007ffe0ab16b90 R11: 0000000000000293 R12: 000000000000002d [ 43.641726][ C0] R13: 0000000000000064 R14: 0000000000000000 R15: 00000000006dbc3c