[ OK ] Started OpenBSD Secure Shell server. [ 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.60' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 38.590822][ T6789] IPVS: ftp: loaded support on port[0] = 21 [ 38.621727][ T6789] ttyprintk ttyprintk: tty_port_close_start: tty->count = 1 port count = 2 [ 38.630737][ C1] [ 38.630739][ C1] ====================================================== [ 38.630741][ C1] WARNING: possible circular locking dependency detected [ 38.630742][ C1] 5.8.0-rc3-syzkaller #0 Not tainted [ 38.630743][ C1] ------------------------------------------------------ [ 38.630745][ C1] syz-executor192/6789 is trying to acquire lock: [ 38.630746][ C1] ffffffff892e7940 (console_owner){..-.}-{0:0}, at: console_lock_spinning_enable+0x2d/0x60 [ 38.630750][ C1] [ 38.630752][ C1] but task is already holding lock: [ 38.630753][ C1] ffffffff8c0d41f0 (&port->lock#2){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 38.630757][ C1] [ 38.630759][ C1] which lock already depends on the new lock. [ 38.630759][ C1] [ 38.630760][ C1] [ 38.630761][ C1] the existing dependency chain (in reverse order) is: [ 38.630762][ C1] [ 38.630763][ C1] -> #2 (&port->lock#2){-.-.}-{2:2}: [ 38.630767][ C1] lock_acquire+0x160/0x720 [ 38.630769][ C1] _raw_spin_lock_irqsave+0x9e/0xc0 [ 38.630770][ C1] tty_port_tty_get+0x21/0xe0 [ 38.630771][ C1] tty_port_default_wakeup+0x11/0x40 [ 38.630772][ C1] serial8250_tx_chars+0x5ea/0x800 [ 38.630773][ C1] serial8250_handle_irq+0x2fd/0x3e0 [ 38.630775][ C1] serial8250_default_handle_irq+0xac/0x190 [ 38.630776][ C1] serial8250_interrupt+0x93/0x180 [ 38.630777][ C1] __handle_irq_event_percpu+0x1b7/0x610 [ 38.630778][ C1] handle_irq_event+0xbd/0x280 [ 38.630779][ C1] handle_edge_irq+0x245/0xbf0 [ 38.630781][ C1] asm_call_on_stack+0xf/0x20 [ 38.630782][ C1] common_interrupt+0x155/0x260 [ 38.630783][ C1] asm_common_interrupt+0x1e/0x40 [ 38.630784][ C1] _raw_spin_unlock_irqrestore+0xa5/0xd0 [ 38.630785][ C1] uart_write+0x767/0x8f0 [ 38.630786][ C1] do_output_char+0x63b/0x940 [ 38.630787][ C1] n_tty_write+0xd5c/0x1170 [ 38.630788][ C1] tty_write+0x593/0x940 [ 38.630790][ C1] do_iter_write+0x402/0x540 [ 38.630791][ C1] do_writev+0x23f/0x4a0 [ 38.630792][ C1] do_syscall_64+0x73/0xe0 [ 38.630793][ C1] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 38.630794][ C1] [ 38.630794][ C1] -> #1 (&port->lock){-.-.}-{2:2}: [ 38.630798][ C1] lock_acquire+0x160/0x720 [ 38.630799][ C1] _raw_spin_lock_irqsave+0x9e/0xc0 [ 38.630801][ C1] serial8250_console_write+0x13e/0xd60 [ 38.630802][ C1] console_unlock+0x90c/0xec0 [ 38.630803][ C1] vprintk_emit+0x1f8/0x3c0 [ 38.630804][ C1] printk+0x62/0x83 [ 38.630805][ C1] register_console+0x7ca/0xad0 [ 38.630806][ C1] univ8250_console_init+0x41/0x43 [ 38.630807][ C1] console_init+0x52/0x97 [ 38.630808][ C1] start_kernel+0x426/0x777 [ 38.630809][ C1] secondary_startup_64+0xa4/0xb0 [ 38.630810][ C1] [ 38.630811][ C1] -> #0 (console_owner){..-.}-{0:0}: [ 38.630815][ C1] validate_chain+0x1b0c/0x8920 [ 38.630816][ C1] __lock_acquire+0x116c/0x2c30 [ 38.630817][ C1] lock_acquire+0x160/0x720 [ 38.630818][ C1] console_lock_spinning_enable+0x52/0x60 [ 38.630819][ C1] console_unlock+0x73f/0xec0 [ 38.630820][ C1] vprintk_emit+0x1f8/0x3c0 [ 38.630821][ C1] printk+0x62/0x83 [ 38.630822][ C1] tty_port_close_start+0x3c8/0x550 [ 38.630824][ C1] tty_port_close+0x25/0x140 [ 38.630825][ C1] tty_release+0x378/0xf90 [ 38.630826][ C1] __fput+0x2f0/0x750 [ 38.630827][ C1] task_work_run+0x137/0x1c0 [ 38.630828][ C1] __prepare_exit_to_usermode+0x14c/0x1e0 [ 38.630829][ C1] do_syscall_64+0x7f/0xe0 [ 38.630830][ C1] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 38.630831][ C1] [ 38.630832][ C1] other info that might help us debug this: [ 38.630833][ C1] [ 38.630834][ C1] Chain exists of: [ 38.630835][ C1] console_owner --> &port->lock --> &port->lock#2 [ 38.630840][ C1] [ 38.630841][ C1] Possible unsafe locking scenario: [ 38.630842][ C1] [ 38.630843][ C1] CPU0 CPU1 [ 38.630844][ C1] ---- ---- [ 38.630845][ C1] lock(&port->lock#2); [ 38.630848][ C1] lock(&port->lock); [ 38.630850][ C1] lock(&port->lock#2); [ 38.630853][ C1] lock(console_owner); [ 38.630855][ C1] [ 38.630856][ C1] *** DEADLOCK *** [ 38.630857][ C1] [ 38.630858][ C1] 3 locks held by syz-executor192/6789: [ 38.630859][ C1] #0: ffff8880a7b361c0 (&tty->legacy_mutex){+.+.}-{3:3}, at: tty_release+0xa5/0xf90 [ 38.630863][ C1] #1: ffffffff8c0d41f0 (&port->lock#2){-.-.}-{2:2}, at: tty_port_close_start+0x58/0x550 [ 38.630872][ C1] #2: ffffffff892e7820 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x1db/0x3c0 [ 38.630877][ C1] [ 38.630878][ C1] stack backtrace: [ 38.630879][ C1] CPU: 1 PID: 6789 Comm: syz-executor192 Not tainted 5.8.0-rc3-syzkaller #0 [ 38.630881][ C1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 38.630882][ C1] Call Trace: [ 38.630883][ C1] dump_stack+0x1f0/0x31e [ 38.630884][ C1] print_circular_bug+0xc72/0xea0 [ 38.630885][ C1] ? stack_trace_save+0xad/0x150 [ 38.630886][ C1] ? save_trace+0x49/0xba0 [ 38.630887][ C1] check_noncircular+0x1fb/0x3a0 [ 38.630888][ C1] validate_chain+0x1b0c/0x8920 [ 38.630889][ C1] ? mark_lock+0x102/0x1b00 [ 38.630890][ C1] ? mark_lock+0x102/0x1b00 [ 38.630891][ C1] ? put_dec_trunc8+0x19a/0x290 [ 38.630892][ C1] ? number+0xf14/0x1190 [ 38.630894][ C1] __lock_acquire+0x116c/0x2c30 [ 38.630894][ C1] ? sprintf+0x71/0x90 [ 38.630895][ C1] lock_acquire+0x160/0x720 [ 38.630897][ C1] ? console_lock_spinning_enable+0x2d/0x60 [ 38.630898][ C1] console_lock_spinning_enable+0x52/0x60 [ 38.630899][ C1] ? console_lock_spinning_enable+0x2d/0x60 [ 38.630900][ C1] console_unlock+0x73f/0xec0 [ 38.630901][ C1] ? __down_trylock_console_sem+0x178/0x1b0 [ 38.630902][ C1] ? vprintk_emit+0x1db/0x3c0 [ 38.630903][ C1] ? vprintk_emit+0x1db/0x3c0 [ 38.630904][ C1] vprintk_emit+0x1f8/0x3c0 [ 38.630905][ C1] printk+0x62/0x83 [ 38.630906][ C1] tty_port_close_start+0x3c8/0x550 [ 38.630907][ C1] tty_port_close+0x25/0x140 [ 38.630908][ C1] ? tpk_open+0x60/0x60 [ 38.630909][ C1] tty_release+0x378/0xf90 [ 38.630910][ C1] ? fsnotify+0x128d/0x1340 [ 38.630911][ C1] ? ima_file_free+0xea/0x3b0 [ 38.630912][ C1] ? tty_release_struct+0xd0/0xd0 [ 38.630913][ C1] __fput+0x2f0/0x750 [ 38.630914][ C1] task_work_run+0x137/0x1c0 [ 38.630916][ C1] __prepare_exit_to_usermode+0x14c/0x1e0 [ 38.630917][ C1] ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 38.630918][ C1] do_syscall_64+0x7f/0xe0 [ 38.630919][ C1] entry_SYSCALL_64_after_hwf