Warning: Permanently added '10.128.0.64' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 42.335775][ T7073] IPVS: ftp: loaded support on port[0] = 21 [ 42.373220][ T7073] ttyprintk ttyprintk: tty_port_close_start: tty->count = 1 port count = 2 [ 42.382371][ C0] [ 42.382374][ C0] ====================================================== [ 42.382376][ C0] WARNING: possible circular locking dependency detected [ 42.382377][ C0] 5.7.0-rc1-syzkaller #0 Not tainted [ 42.382379][ C0] ------------------------------------------------------ [ 42.382381][ C0] syz-executor072/7073 is trying to acquire lock: [ 42.382383][ C0] ffffffff892e6a30 (console_owner){-.-.}-{0:0}, at: console_lock_spinning_enable+0x2d/0x60 [ 42.382388][ C0] [ 42.382390][ C0] but task is already holding lock: [ 42.382391][ C0] ffffffff8c07fb60 (&port->lock#2){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 42.382397][ C0] [ 42.382399][ C0] which lock already depends on the new lock. [ 42.382399][ C0] [ 42.382400][ C0] [ 42.382402][ C0] the existing dependency chain (in reverse order) is: [ 42.382403][ C0] [ 42.382404][ C0] -> #2 (&port->lock#2){-.-.}-{2:2}: [ 42.382409][ C0] lock_acquire+0x169/0x480 [ 42.382411][ C0] _raw_spin_lock_irqsave+0x9e/0xc0 [ 42.382412][ C0] tty_port_tty_get+0x21/0xe0 [ 42.382414][ C0] tty_port_default_wakeup+0x11/0x40 [ 42.382416][ C0] serial8250_tx_chars+0x5ea/0x800 [ 42.382417][ C0] serial8250_handle_irq+0x2fd/0x3e0 [ 42.382419][ C0] serial8250_default_handle_irq+0xac/0x190 [ 42.382421][ C0] serial8250_interrupt+0x93/0x180 [ 42.382422][ C0] __handle_irq_event_percpu+0x1b7/0x610 [ 42.382424][ C0] handle_irq_event+0xbd/0x280 [ 42.382425][ C0] handle_edge_irq+0x245/0xbf0 [ 42.382426][ C0] do_IRQ+0xf6/0x1d0 [ 42.382428][ C0] ret_from_intr+0x0/0x2b [ 42.382429][ C0] _raw_spin_unlock_irqrestore+0xa5/0xd0 [ 42.382431][ C0] uart_write+0x7d3/0x9c0 [ 42.382432][ C0] do_output_char+0x63b/0x940 [ 42.382433][ C0] n_tty_write+0xd5c/0x1170 [ 42.382435][ C0] tty_write+0x593/0x940 [ 42.382436][ C0] do_iter_write+0x402/0x540 [ 42.382437][ C0] do_writev+0x23f/0x4a0 [ 42.382439][ C0] do_syscall_64+0xf3/0x1b0 [ 42.382454][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 42.382454][ C0] [ 42.382455][ C0] -> #1 (&port->lock){-.-.}-{2:2}: [ 42.382460][ C0] lock_acquire+0x169/0x480 [ 42.382461][ C0] _raw_spin_lock_irqsave+0x9e/0xc0 [ 42.382463][ C0] serial8250_console_write+0x13e/0xd50 [ 42.382465][ C0] console_unlock+0x90c/0xec0 [ 42.382466][ C0] vprintk_emit+0x1f8/0x3c0 [ 42.382467][ C0] printk+0x62/0x83 [ 42.382469][ C0] register_console+0xb64/0xed0 [ 42.382470][ C0] univ8250_console_init+0x41/0x43 [ 42.382471][ C0] console_init+0x52/0x97 [ 42.382473][ C0] start_kernel+0x421/0x76f [ 42.382474][ C0] secondary_startup_64+0xa4/0xb0 [ 42.382475][ C0] [ 42.382476][ C0] -> #0 (console_owner){-.-.}-{0:0}: [ 42.382480][ C0] validate_chain+0x1b09/0x8920 [ 42.382482][ C0] __lock_acquire+0x116c/0x2c30 [ 42.382483][ C0] lock_acquire+0x169/0x480 [ 42.382485][ C0] console_lock_spinning_enable+0x52/0x60 [ 42.382486][ C0] console_unlock+0x73f/0xec0 [ 42.382487][ C0] vprintk_emit+0x1f8/0x3c0 [ 42.382489][ C0] printk+0x62/0x83 [ 42.382490][ C0] tty_port_close_start+0x3c8/0x550 [ 42.382491][ C0] tty_port_close+0x25/0x140 [ 42.382493][ C0] tty_release+0x40a/0x1100 [ 42.382494][ C0] __fput+0x2ed/0x750 [ 42.382495][ C0] task_work_run+0x147/0x1d0 [ 42.382497][ C0] prepare_exit_to_usermode+0x48e/0x600 [ 42.382498][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 42.382499][ C0] [ 42.382501][ C0] other info that might help us debug this: [ 42.382502][ C0] [ 42.382503][ C0] Chain exists of: [ 42.382504][ C0] console_owner --> &port->lock --> &port->lock#2 [ 42.382510][ C0] [ 42.382511][ C0] Possible unsafe locking scenario: [ 42.382512][ C0] [ 42.382514][ C0] CPU0 CPU1 [ 42.382515][ C0] ---- ---- [ 42.382516][ C0] lock(&port->lock#2); [ 42.382520][ C0] lock(&port->lock); [ 42.382523][ C0] lock(&port->lock#2); [ 42.382526][ C0] lock(console_owner); [ 42.382529][ C0] [ 42.382530][ C0] *** DEADLOCK *** [ 42.382530][ C0] [ 42.382532][ C0] 3 locks held by syz-executor072/7073: [ 42.382533][ C0] #0: ffff888098f9b1c0 (&tty->legacy_mutex){+.+.}-{3:3}, at: tty_release+0xb3/0x1100 [ 42.382538][ C0] #1: ffffffff8c07fb60 (&port->lock#2){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 42.382545][ C0] #2: ffffffff892e6910 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x1db/0x3c0 [ 42.382550][ C0] [ 42.382551][ C0] stack backtrace: [ 42.382553][ C0] CPU: 0 PID: 7073 Comm: syz-executor072 Not tainted 5.7.0-rc1-syzkaller #0 [ 42.382556][ C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 42.382557][ C0] Call Trace: [ 42.382558][ C0] dump_stack+0x1e9/0x30e [ 42.382559][ C0] print_circular_bug+0xc72/0xea0 [ 42.382561][ C0] ? stack_trace_save+0xad/0x150 [ 42.382562][ C0] ? save_trace+0x49/0xb60 [ 42.382563][ C0] check_noncircular+0x1fb/0x3a0 [ 42.382565][ C0] validate_chain+0x1b09/0x8920 [ 42.382566][ C0] ? mark_lock+0x102/0x1b00 [ 42.382567][ C0] ? put_dec_trunc8+0x19a/0x290 [ 42.382568][ C0] ? number+0xf14/0x1190 [ 42.382570][ C0] __lock_acquire+0x116c/0x2c30 [ 42.382571][ C0] ? sprintf+0x71/0x90 [ 42.382572][ C0] lock_acquire+0x169/0x480 [ 42.382574][ C0] ? console_lock_spinning_enable+0x2d/0x60 [ 42.382575][ C0] console_lock_spinning_enable+0x52/0x60 [ 42.382577][ C0] ? console_lock_spinning_enable+0x2d/0x60 [ 42.382578][ C0] console_unlock+0x73f/0xec0 [ 42.382579][ C0] ? __down_trylock_console_sem+0x178/0x1b0 [ 42.382581][ C0] ? vprintk_emit+0x1db/0x3c0 [ 42.382582][ C0] ? vprintk_emit+0x1db/0x3c0 [ 42.382583][ C0] vprintk_emit+0x1f8/0x3c0 [ 42.382584][ C0] printk+0x62/0x83 [ 42.382586][ C0] ? _raw_spin_lock_irqsave+0xaa/0xc0 [ 42.382587][ C0] tty_port_close_start+0x3c8/0x550 [ 42.382588][ C0] tty_port_close+0x25/0x140 [ 42.382589][ C0] ? tpk_open+0x60/0x60 [ 42.382591][ C0] tty_release+0x40a/0x1100 [ 42.382592][ C0] ? ima_file_free+0xea/0x3b0 [ 42.382593][ C0] ? tty_release_struct+0xd0/0xd0 [ 42.382594][ C0] __fput+0x2ed/0x750 [ 42.382596][ C0] task_work_run+0x147/0x1d0 [ 42.382597][ C0] prepare_exit_to_usermode+0x48e/0x600 [ 42.382598][ C0] ? syscall_return_slowpath+0xf9/0x420 [ 42.382600][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xb3 [ 42.382601][ C0] RIP: 0033:0x4055b1 [ 42.382606][ 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 [ 42.382607][ C0] RSP: 002b:00007ffd81661060 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 [ 42.382610][ C0] RAX: 0000000000000000 RBX: 00007ffd81661090 RCX: 00000000004055b1 [ 42.382612][ C0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 [ 42.382614][ C0] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 [ 42.382616][ C0] R10: 00007ffd81661090 R11: 0000000000000293 R12: 000000000000002d [ 42.382618][ C0] R13: 0000000000000064 R14: 0000000000000000 R15: 00000000006dbc3c