[ OK ] Reached target Login Prompts. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. Debian GNU/Linux 9 syzkaller ttyS0 Warning: Permanently added '10.128.0.161' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 54.419048][ T8414] IPVS: ftp: loaded support on port[0] = 21 [ 54.540065][ T8414] ttyprintk ttyprintk: tty_port_close_start: tty->count = 1 port count = 2 [ 54.549356][ C1] [ 54.549365][ C1] ====================================================== [ 54.549368][ C1] WARNING: possible circular locking dependency detected [ 54.549371][ C1] 5.11.0-syzkaller #0 Not tainted [ 54.549374][ C1] ------------------------------------------------------ [ 54.549377][ C1] syz-executor095/8414 is trying to acquire lock: [ 54.549380][ C1] ffffffff8c706140 (console_owner){....}-{0:0}, at: console_lock_spinning_enable+0x2d/0x60 [ 54.549393][ C1] [ 54.549395][ C1] but task is already holding lock: [ 54.549397][ C1] ffffffff90aca258 (&port->lock){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 54.549407][ C1] [ 54.549409][ C1] which lock already depends on the new lock. [ 54.549411][ C1] [ 54.549413][ C1] [ 54.549415][ C1] the existing dependency chain (in reverse order) is: [ 54.549417][ C1] [ 54.549418][ C1] -> #2 (&port->lock){-.-.}-{2:2}: [ 54.549427][ C1] lock_acquire+0x114/0x5e0 [ 54.549429][ C1] _raw_spin_lock_irqsave+0x73/0xa0 [ 54.549432][ C1] tty_port_tty_get+0x21/0xe0 [ 54.549434][ C1] tty_port_default_wakeup+0x11/0x40 [ 54.549436][ C1] serial8250_tx_chars+0x5ea/0x800 [ 54.549439][ C1] serial8250_handle_irq+0x2fd/0x3e0 [ 54.549441][ C1] serial8250_default_handle_irq+0xaf/0x190 [ 54.549444][ C1] serial8250_interrupt+0xa3/0x1e0 [ 54.549446][ C1] __handle_irq_event_percpu+0x1b7/0x620 [ 54.549448][ C1] handle_irq_event+0xbd/0x280 [ 54.549451][ C1] handle_edge_irq+0x245/0xbe0 [ 54.549453][ C1] asm_call_irq_on_stack+0xf/0x20 [ 54.549456][ C1] common_interrupt+0x147/0x230 [ 54.549458][ C1] asm_common_interrupt+0x1e/0x40 [ 54.549460][ C1] acpi_idle_enter+0x3c9/0x700 [ 54.549462][ C1] cpuidle_enter_state+0x486/0xd50 [ 54.549465][ C1] cpuidle_enter+0x59/0x90 [ 54.549467][ C1] do_idle+0x315/0x530 [ 54.549469][ C1] cpu_startup_entry+0x15/0x20 [ 54.549471][ C1] start_kernel+0x494/0x53a [ 54.549473][ C1] secondary_startup_64_no_verify+0xb0/0xbb [ 54.549475][ C1] [ 54.549477][ C1] -> #1 (&port_lock_key){-.-.}-{2:2}: [ 54.549485][ C1] lock_acquire+0x114/0x5e0 [ 54.549487][ C1] _raw_spin_lock_irqsave+0x73/0xa0 [ 54.549490][ C1] serial8250_console_write+0x108/0xcc0 [ 54.549492][ C1] console_unlock+0x960/0xcf0 [ 54.549494][ C1] vprintk_emit+0x15e/0x200 [ 54.549496][ C1] printk+0x62/0x83 [ 54.549498][ C1] register_console+0x781/0xa60 [ 54.549500][ C1] univ8250_console_init+0x41/0x43 [ 54.549503][ C1] console_init+0x52/0x97 [ 54.549505][ C1] start_kernel+0x302/0x53a [ 54.549507][ C1] secondary_startup_64_no_verify+0xb0/0xbb [ 54.549509][ C1] [ 54.549510][ C1] -> #0 (console_owner){....}-{0:0}: [ 54.549519][ C1] check_prevs_add+0x353/0x5280 [ 54.549521][ C1] __lock_acquire+0x4227/0x5e90 [ 54.549523][ C1] lock_acquire+0x114/0x5e0 [ 54.549525][ C1] console_lock_spinning_enable+0x52/0x60 [ 54.549528][ C1] console_unlock+0x69e/0xcf0 [ 54.549530][ C1] vprintk_emit+0x15e/0x200 [ 54.549532][ C1] printk+0x62/0x83 [ 54.549534][ C1] tty_port_close_start+0x3c8/0x550 [ 54.549537][ C1] tty_port_close+0x26/0x140 [ 54.549539][ C1] tty_release+0x30c/0xef0 [ 54.549541][ C1] __fput+0x34d/0x7a0 [ 54.549543][ C1] task_work_run+0x137/0x1c0 [ 54.549545][ C1] exit_to_user_mode_prepare+0x10b/0x1e0 [ 54.549547][ C1] syscall_exit_to_user_mode+0x48/0x180 [ 54.549550][ C1] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 54.549552][ C1] [ 54.549554][ C1] other info that might help us debug this: [ 54.549556][ C1] [ 54.549557][ C1] Chain exists of: [ 54.549559][ C1] console_owner --> &port_lock_key --> &port->lock [ 54.549571][ C1] [ 54.549572][ C1] Possible unsafe locking scenario: [ 54.549574][ C1] [ 54.549576][ C1] CPU0 CPU1 [ 54.549578][ C1] ---- ---- [ 54.549580][ C1] lock(&port->lock); [ 54.549585][ C1] lock(&port_lock_key); [ 54.549591][ C1] lock(&port->lock); [ 54.549597][ C1] lock(console_owner); [ 54.549602][ C1] [ 54.549603][ C1] *** DEADLOCK *** [ 54.549605][ C1] [ 54.549606][ C1] 3 locks held by syz-executor095/8414: [ 54.549608][ C1] #0: ffff88801bc4e1c0 (&tty->legacy_mutex){+.+.}-{3:3}, at: tty_release+0xac/0xef0 [ 54.549619][ C1] #1: ffffffff90aca258 (&port->lock){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 54.549631][ C1] #2: ffffffff8c5ede60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x145/0x200 [ 54.549641][ C1] [ 54.549643][ C1] stack backtrace: [ 54.549645][ C1] CPU: 1 PID: 8414 Comm: syz-executor095 Not tainted 5.11.0-syzkaller #0 [ 54.549648][ C1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 54.549651][ C1] Call Trace: [ 54.549653][ C1] dump_stack+0x137/0x1be [ 54.549655][ C1] ? irq_work_queue+0x7a/0x120 [ 54.549657][ C1] print_circular_bug+0xadf/0xd80 [ 54.549659][ C1] ? stack_trace_save+0xad/0x150 [ 54.549661][ C1] ? save_trace+0x5a/0x9f0 [ 54.549663][ C1] check_noncircular+0x221/0x2d0 [ 54.549665][ C1] ? __bfs+0x2e1/0x5c0 [ 54.549667][ C1] check_prevs_add+0x353/0x5280 [ 54.549669][ C1] ? mark_lock+0x139/0x2030 [ 54.549671][ C1] ? put_dec_trunc8+0x18a/0x390 [ 54.549673][ C1] ? put_dec+0xb9/0xe0 [ 54.549674][ C1] __lock_acquire+0x4227/0x5e90 [ 54.549676][ C1] lock_acquire+0x114/0x5e0 [ 54.549679][ C1] ? console_lock_spinning_enable+0x2d/0x60 [ 54.549681][ C1] console_lock_spinning_enable+0x52/0x60 [ 54.549683][ C1] ? console_lock_spinning_enable+0x2d/0x60 [ 54.549685][ C1] console_unlock+0x69e/0xcf0 [ 54.549688][ C1] ? _raw_spin_unlock_irqrestore+0x40/0x60 [ 54.549690][ C1] vprintk_emit+0x15e/0x200 [ 54.549692][ C1] printk+0x62/0x83 [ 54.549693][ C1] tty_port_close_start+0x3c8/0x550 [ 54.549695][ C1] ? tpk_open+0x60/0x60 [ 54.549697][ C1] tty_port_close+0x26/0x140 [ 54.549699][ C1] ? tpk_open+0x60/0x60 [ 54.549701][ C1] tty_release+0x30c/0xef0 [ 54.549703][ C1] ? __fsnotify_parent+0x44e/0x620 [ 54.549705][ C1] ? task_work_run+0x100/0x1c0 [ 54.549707][ C1] ? ima_file_free+0xe8/0x3b0 [ 54.549710][ C1] ? tty_release_struct+0xd0/0xd0 [ 54.549712][ C1] __fput+0x34d/0x7a0 [ 54.549714][ C1] task_work_run+0x137/0x1c0 [ 54.549716][ C1] exit_to_user_mode_prepare+0x10b/0x1e0 [ 54.549731][ C1] ? trace_irq_disable_rcuidle+0x11/0x170 [ 54.549734][ C1] syscall_exit_to_user_mode+0x48/0x180 [ 54.549736][ C1] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 54.549738][ C1] RIP: 0033:0x407abb [ 54.549741][ C1] Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 [ 54.549746][ C1] RSP: 002b:00007ffc8a636ed0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003