[....] Starting enhanced syslogd: rsyslogd[?25l[?1c7[ ok 8[?25h[?0c. [ 53.159796][ T27] audit: type=1800 audit(1582340483.293:25): pid=8692 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="cron" dev="sda1" ino=2414 res=0 [ 53.179448][ T27] audit: type=1800 audit(1582340483.293:26): pid=8692 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="mcstrans" dev="sda1" ino=2457 res=0 [ 53.225296][ T27] audit: type=1800 audit(1582340483.293:27): pid=8692 uid=0 auid=4294967295 ses=4294967295 subj=_ op=collect_data cause=failed(directio) comm="startpar" name="restorecond" dev="sda1" ino=2436 res=0 [....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 Warning: Permanently added '10.128.10.21' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 65.417651][ T8845] IPVS: ftp: loaded support on port[0] = 21 [ 65.449661][ T8845] ttyprintk ttyprintk: tty_port_close_start: tty->count = 1 port count = 2 [ 65.458837][ C0] [ 65.458840][ C0] ====================================================== [ 65.458842][ C0] WARNING: possible circular locking dependency detected [ 65.458843][ C0] 5.6.0-rc2-syzkaller #0 Not tainted [ 65.458845][ C0] ------------------------------------------------------ [ 65.458847][ C0] syz-executor613/8845 is trying to acquire lock: [ 65.458848][ C0] ffffffff892d7e58 (console_owner){..-.}, at: console_lock_spinning_enable+0x31/0x60 [ 65.458854][ C0] [ 65.458855][ C0] but task is already holding lock: [ 65.458857][ C0] ffffffff8af38b38 (&(&port->lock)->rlock){-.-.}, at: tty_port_close_start+0x5c/0x570 [ 65.458862][ C0] [ 65.458863][ C0] which lock already depends on the new lock. [ 65.458864][ C0] [ 65.458865][ C0] [ 65.458867][ C0] the existing dependency chain (in reverse order) is: [ 65.458868][ C0] [ 65.458869][ C0] -> #2 (&(&port->lock)->rlock){-.-.}: [ 65.458874][ C0] lock_acquire+0x154/0x250 [ 65.458875][ C0] _raw_spin_lock_irqsave+0xa1/0xc0 [ 65.458877][ C0] tty_port_tty_get+0x25/0xf0 [ 65.458878][ C0] tty_port_default_wakeup+0x15/0x40 [ 65.458880][ C0] tty_port_tty_wakeup+0x5a/0x70 [ 65.458881][ C0] uart_write_wakeup+0x48/0x60 [ 65.458883][ C0] serial8250_tx_chars+0x61e/0x830 [ 65.458884][ C0] serial8250_handle_irq+0x27f/0x330 [ 65.458886][ C0] serial8250_default_handle_irq+0xc5/0x1d0 [ 65.458888][ C0] serial8250_interrupt+0xa4/0x190 [ 65.458889][ C0] __handle_irq_event_percpu+0x10e/0x580 [ 65.458891][ C0] handle_irq_event+0xbe/0x280 [ 65.458892][ C0] handle_edge_irq+0x28a/0xc90 [ 65.458893][ C0] do_IRQ+0xfb/0x1e0 [ 65.458895][ C0] ret_from_intr+0x0/0x36 [ 65.458896][ C0] _raw_spin_unlock_irqrestore+0xa8/0xe0 [ 65.458898][ C0] uart_write+0x7b4/0x990 [ 65.458899][ C0] n_tty_write+0xd0c/0x1200 [ 65.458901][ C0] tty_write+0x5a1/0x950 [ 65.458902][ C0] redirected_tty_write+0x9e/0xb0 [ 65.458903][ C0] __vfs_write+0xb8/0x740 [ 65.458905][ C0] vfs_write+0x270/0x580 [ 65.458906][ C0] ksys_write+0x117/0x220 [ 65.458907][ C0] __x64_sys_write+0x7b/0x90 [ 65.458909][ C0] do_syscall_64+0xf7/0x1c0 [ 65.458910][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 65.458911][ C0] [ 65.458912][ C0] -> #1 (&port_lock_key){-.-.}: [ 65.458917][ C0] lock_acquire+0x154/0x250 [ 65.458919][ C0] _raw_spin_lock_irqsave+0xa1/0xc0 [ 65.458920][ C0] serial8250_console_write+0x186/0xca0 [ 65.458922][ C0] univ8250_console_write+0x50/0x70 [ 65.458923][ C0] console_unlock+0x90c/0xec0 [ 65.458924][ C0] vprintk_emit+0x239/0x3a0 [ 65.458926][ C0] vprintk_default+0x28/0x30 [ 65.458927][ C0] vprintk_func+0x158/0x170 [ 65.458929][ C0] printk+0x62/0x8d [ 65.458930][ C0] register_console+0xb93/0xf20 [ 65.458932][ C0] univ8250_console_init+0x4b/0x4d [ 65.458933][ C0] console_init+0x56/0x9c [ 65.458934][ C0] start_kernel+0x428/0x777 [ 65.458936][ C0] x86_64_start_reservations+0x18/0x2e [ 65.458937][ C0] x86_64_start_kernel+0x7a/0x7d [ 65.458939][ C0] secondary_startup_64+0xa4/0xb0 [ 65.458940][ C0] [ 65.458941][ C0] -> #0 (console_owner){..-.}: [ 65.458945][ C0] validate_chain+0x1507/0x7be0 [ 65.458947][ C0] __lock_acquire+0xc5a/0x1bc0 [ 65.458948][ C0] lock_acquire+0x154/0x250 [ 65.458950][ C0] console_lock_spinning_enable+0x56/0x60 [ 65.458951][ C0] console_unlock+0x73f/0xec0 [ 65.458953][ C0] vprintk_emit+0x239/0x3a0 [ 65.458954][ C0] vprintk_default+0x28/0x30 [ 65.458956][ C0] vprintk_func+0x158/0x170 [ 65.458957][ C0] printk+0x62/0x8d [ 65.458959][ C0] tty_port_close_start+0x3d9/0x570 [ 65.458960][ C0] tty_port_close+0x29/0x140 [ 65.458961][ C0] tpk_close+0x9a/0x110 [ 65.458963][ C0] tty_release+0x391/0xfb0 [ 65.458964][ C0] __fput+0x2e4/0x740 [ 65.458965][ C0] ____fput+0x15/0x20 [ 65.458967][ C0] task_work_run+0x176/0x1b0 [ 65.458968][ C0] prepare_exit_to_usermode+0x480/0x5b0 [ 65.458970][ C0] syscall_return_slowpath+0x113/0x4a0 [ 65.458971][ C0] do_syscall_64+0x11f/0x1c0 [ 65.458973][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 65.458974][ C0] [ 65.458975][ C0] other info that might help us debug this: [ 65.458976][ C0] [ 65.458977][ C0] Chain exists of: [ 65.458978][ C0] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 65.458984][ C0] [ 65.458986][ C0] Possible unsafe locking scenario: [ 65.458987][ C0] [ 65.458988][ C0] CPU0 CPU1 [ 65.458990][ C0] ---- ---- [ 65.458990][ C0] lock(&(&port->lock)->rlock); [ 65.458994][ C0] lock(&port_lock_key); [ 65.458997][ C0] lock(&(&port->lock)->rlock); [ 65.459000][ C0] lock(console_owner); [ 65.459003][ C0] [ 65.459004][ C0] *** DEADLOCK *** [ 65.459005][ C0] [ 65.459006][ C0] 3 locks held by syz-executor613/8845: [ 65.459007][ C0] #0: ffff888096c68198 (&tty->legacy_mutex){+.+.}, at: tty_lock+0xa6/0x110 [ 65.459013][ C0] #1: ffffffff8af38b38 (&(&port->lock)->rlock){-.-.}, at: tty_port_close_start+0x5c/0x570 [ 65.459019][ C0] #2: ffffffff892d7d58 (console_lock){+.+.}, at: vprintk_emit+0x21c/0x3a0 [ 65.459025][ C0] [ 65.459026][ C0] stack backtrace: [ 65.459029][ C0] CPU: 0 PID: 8845 Comm: syz-executor613 Not tainted 5.6.0-rc2-syzkaller #0 [ 65.459031][ C0] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 65.459032][ C0] Call Trace: [ 65.459033][ C0] dump_stack+0x1fb/0x318 [ 65.459035][ C0] print_circular_bug+0xc3f/0xe70 [ 65.459036][ C0] ? stack_trace_save+0xb1/0x150 [ 65.459038][ C0] ? save_trace+0x4b/0x9f0 [ 65.459039][ C0] check_noncircular+0x206/0x3a0 [ 65.459040][ C0] validate_chain+0x1507/0x7be0 [ 65.459042][ C0] ? __kasan_check_read+0x11/0x20 [ 65.459043][ C0] ? mark_lock+0x107/0x1650 [ 65.459044][ C0] ? put_dec+0xd1/0xe0 [ 65.459045][ C0] ? memset+0x31/0x40 [ 65.459047][ C0] __lock_acquire+0xc5a/0x1bc0 [ 65.459048][ C0] ? sprintf+0x71/0x90 [ 65.459049][ C0] ? trace_lock_acquire+0x15b/0x1d0 [ 65.459051][ C0] lock_acquire+0x154/0x250 [ 65.459052][ C0] ? console_lock_spinning_enable+0x31/0x60 [ 65.459054][ C0] console_lock_spinning_enable+0x56/0x60 [ 65.459055][ C0] ? console_lock_spinning_enable+0x31/0x60 [ 65.459057][ C0] console_unlock+0x73f/0xec0 [ 65.459058][ C0] ? __down_trylock_console_sem+0x180/0x1b0 [ 65.459059][ C0] ? vprintk_emit+0x21c/0x3a0 [ 65.459061][ C0] vprintk_emit+0x239/0x3a0 [ 65.459062][ C0] vprintk_default+0x28/0x30 [ 65.459063][ C0] vprintk_func+0x158/0x170 [ 65.459064][ C0] printk+0x62/0x8d [ 65.459066][ C0] tty_port_close_start+0x3d9/0x570 [ 65.459068][ C0] tty_port_close+0x29/0x140 [ 65.459070][ C0] tpk_close+0x9a/0x110 [ 65.459072][ C0] ? tpk_open+0x60/0x60 [ 65.459073][ C0] tty_release+0x391/0xfb0 [ 65.459074][ C0] ? fsnotify+0x1308/0x13c0 [ 65.459076][ C0] ? tty_release_struct+0xe0/0xe0 [ 65.459077][ C0] __fput+0x2e4/0x740 [ 65.459078][ C0] ____fput+0x15/0x20 [ 65.459080][ C0] task_work_run+0x176/0x1b0 [ 65.459081][ C0] prepare_exit_to_usermode+0x480/0x5b0 [ 65.459083][ C0] syscall_return_slowpath+0x113/0x4a0 [ 65.459084][ C0] do_syscall_64+0x11f/0x1c0 [ 65.459086][ C0] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 65.459087][ C0] RIP: 0033:0x4055e1 [ 65.459092][ 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 [ 65.459094][ C0] RSP: 002b:00007fff74569090 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 [ 65.459097][ C0] RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00000000004055e1 [ 65.459099][ C0] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 [ 65.459101][ C0] RBP: 000000000000002d R08: 0000228d20080522 R09: 0000228d20080522 [ 65.459103][ C0] R10: 00007fff745690b0 R11: 0000000000000293 R12: 00000000006dbc3c [ 65.459105][ C0] R13: 0000000000000001 R14: 0000000000000001 R15: 0000000000000000