[[0;32m OK [0m] Started Getty on tty3.
[[0;32m OK [0m] Started Getty on tty2.
[[0;32m OK [0m] Started Getty on tty1.
[[0;32m OK [0m] Started Serial Getty on ttyS0.
[[0;32m OK [0m] Started getty on tty2-tty6 if dbus and logind are not available.
Debian GNU/Linux 9 syzkaller ttyS0
Warning: Permanently added '10.128.10.8' (ECDSA) to the list of known hosts.
syzkaller login: [ 75.480142][ T6515] FAULT_INJECTION: forcing a failure.
[ 75.480142][ T6515] name failslab, interval 1, probability 0, space 0, times 1
[ 75.480240][ T6515]
[ 75.480243][ T6515] ======================================================
[ 75.480247][ T6515] WARNING: possible circular locking dependency detected
[ 75.480251][ T6515] 5.15.0-next-20211112-syzkaller #0 Not tainted
[ 75.480257][ T6515] ------------------------------------------------------
[ 75.480261][ T6515] syz-executor376/6515 is trying to acquire lock:
[ 75.480267][ T6515] ffffffff8ba92c80 (console_owner){....}-{0:0}, at: console_unlock+0x303/0xb70
[ 75.480305][ T6515]
[ 75.480305][ T6515] but task is already holding lock:
[ 75.480308][ T6515] ffff888078adf158 (&port->lock){-.-.}-{2:2}, at: pty_write+0xea/0x1e0
[ 75.480336][ T6515]
[ 75.480336][ T6515] which lock already depends on the new lock.
[ 75.480336][ T6515]
[ 75.480340][ T6515]
[ 75.480340][ T6515] the existing dependency chain (in reverse order) is:
[ 75.480343][ T6515]
[ 75.480343][ T6515] -> #2 (&port->lock){-.-.}-{2:2}:
[ 75.480357][ T6515] _raw_spin_lock_irqsave+0x39/0x50
[ 75.480376][ T6515] tty_port_tty_get+0x1f/0x100
[ 75.480389][ T6515] tty_port_default_wakeup+0x11/0x40
[ 75.480403][ T6515] serial8250_tx_chars+0x4f3/0xad0
[ 75.480419][ T6515] serial8250_handle_irq.part.0+0x328/0x3d0
[ 75.480434][ T6515] serial8250_default_handle_irq+0xb2/0x220
[ 75.480450][ T6515] serial8250_interrupt+0xfd/0x200
[ 75.480463][ T6515] __handle_irq_event_percpu+0x303/0x8f0
executing program
[ 75.480479][ T6515] handle_irq_event+0x102/0x280
[ 75.480493][ T6515] handle_edge_irq+0x25f/0xd00
[ 75.480505][ T6515] __common_interrupt+0x9d/0x210
[ 75.480521][ T6515] common_interrupt+0xa4/0xc0
[ 75.480534][ T6515] asm_common_interrupt+0x1e/0x40
[ 75.480549][ T6515] acpi_idle_do_entry+0x1c6/0x250
[ 75.480563][ T6515] acpi_idle_enter+0x361/0x500
[ 75.480575][ T6515] cpuidle_enter_state+0x1b1/0xc80
[ 75.480588][ T6515] cpuidle_enter+0x4a/0xa0
[ 75.480599][ T6515] do_idle+0x3e8/0x590
[ 75.480611][ T6515] cpu_startup_entry+0x14/0x20
[ 75.480623][ T6515] start_kernel+0x47a/0x49b
[ 75.480639][ T6515] secondary_startup_64_no_verify+0xb0/0xbb
[ 75.480655][ T6515]
[ 75.480655][ T6515] -> #1 (&port_lock_key){-.-.}-{2:2}:
[ 75.480669][ T6515] _raw_spin_lock_irqsave+0x39/0x50
[ 75.480683][ T6515] serial8250_console_write+0x91a/0xb70
[ 75.480694][ T6515] console_unlock+0x7a9/0xb70
[ 75.480707][ T6515] vprintk_emit+0x198/0x4f0
[ 75.480719][ T6515] vprintk+0x80/0x90
[ 75.480732][ T6515] _printk+0xba/0xed
[ 75.480746][ T6515] register_console+0x55f/0x780
[ 75.480759][ T6515] univ8250_console_init+0x3a/0x46
[ 75.480773][ T6515] console_init+0x3c1/0x58d
[ 75.480787][ T6515] start_kernel+0x30b/0x49b
[ 75.480801][ T6515] secondary_startup_64_no_verify+0xb0/0xbb
[ 75.480815][ T6515]
[ 75.480815][ T6515] -> #0 (console_owner){....}-{0:0}:
[ 75.480829][ T6515] __lock_acquire+0x2a07/0x54a0
[ 75.480842][ T6515] lock_acquire+0x1ab/0x510
[ 75.480854][ T6515] console_unlock+0x356/0xb70
[ 75.480867][ T6515] vprintk_emit+0x198/0x4f0
[ 75.480884][ T6515] vprintk+0x80/0x90
[ 75.480897][ T6515] _printk+0xba/0xed
[ 75.480909][ T6515] should_fail+0x472/0x5a0
[ 75.480920][ T6515] should_failslab+0x5/0x10
[ 75.480935][ T6515] __kmalloc+0x72/0x340
[ 75.480947][ T6515] tty_buffer_alloc+0x23f/0x2a0
[ 75.480959][ T6515] __tty_buffer_request_room+0x156/0x2a0
[ 75.480973][ T6515] tty_insert_flip_string_fixed_flag+0x93/0x250
[ 75.480987][ T6515] pty_write+0x11c/0x1e0
[ 75.481000][ T6515] n_tty_write+0xa7a/0xfd0
[ 75.481011][ T6515] file_tty_write.constprop.0+0x526/0x910
[ 75.481027][ T6515] new_sync_write+0x429/0x660
[ 75.481043][ T6515] vfs_write+0x7cd/0xae0
[ 75.481053][ T6515] ksys_write+0x12d/0x250
[ 75.481063][ T6515] do_syscall_64+0x35/0xb0
[ 75.481074][ T6515] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 75.481089][ T6515]
[ 75.481089][ T6515] other info that might help us debug this:
[ 75.481089][ T6515]
[ 75.481092][ T6515] Chain exists of:
[ 75.481092][ T6515] console_owner --> &port_lock_key --> &port->lock
[ 75.481092][ T6515]
[ 75.481108][ T6515] Possible unsafe locking scenario:
[ 75.481108][ T6515]
[ 75.481110][ T6515] CPU0 CPU1
[ 75.481113][ T6515] ---- ----
[ 75.481115][ T6515] lock(&port->lock);
[ 75.481121][ T6515] lock(&port_lock_key);
[ 75.481128][ T6515] lock(&port->lock);
[ 75.481135][ T6515] lock(console_owner);
[ 75.481141][ T6515]
[ 75.481141][ T6515] *** DEADLOCK ***
[ 75.481141][ T6515]
[ 75.481143][ T6515] 6 locks held by syz-executor376/6515:
[ 75.481150][ T6515] #0: ffff88807e57e098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x22/0x80
[ 75.481178][ T6515] #1: ffff88807e57e130 (&tty->atomic_write_lock){+.+.}-{3:3}, at: file_tty_write.constprop.0+0x29f/0x910
[ 75.481210][ T6515] #2: ffff88807e57e2e8 (&tty->termios_rwsem){++++}-{3:3}, at: n_tty_write+0x1bf/0xfd0
[ 75.481237][ T6515] #3: ffffc90001a78378 (&ldata->output_lock){+.+.}-{3:3}, at: n_tty_write+0xa47/0xfd0
[ 75.481263][ T6515] #4: ffff888078adf158 (&port->lock){-.-.}-{2:2}, at: pty_write+0xea/0x1e0
[ 75.481292][ T6515] #5: ffffffff8bb730c0 (console_lock){+.+.}-{0:0}, at: vprintk+0x80/0x90
[ 75.481320][ T6515]
[ 75.481320][ T6515] stack backtrace:
[ 75.481323][ T6515] CPU: 1 PID: 6515 Comm: syz-executor376 Not tainted 5.15.0-next-20211112-syzkaller #0
[ 75.481336][ T6515] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
[ 75.481343][ T6515] Call Trace:
[ 75.481346][ T6515]
[ 75.481351][ T6515] dump_stack_lvl+0xcd/0x134
[ 75.481367][ T6515] check_noncircular+0x25f/0x2e0
[ 75.481380][ T6515] ? filter_irq_stacks+0x90/0x90
[ 75.481395][ T6515] ? print_circular_bug+0x1e0/0x1e0
[ 75.481409][ T6515] ? memcpy+0x39/0x60
[ 75.481420][ T6515] ? lockdep_lock+0xc6/0x200
[ 75.481433][ T6515] ? call_rcu_zapped+0xb0/0xb0
[ 75.481446][ T6515] __lock_acquire+0x2a07/0x54a0
[ 75.481467][ T6515] ? lockdep_hardirqs_on_prepare+0x400/0x400
[ 75.481493][ T6515] lock_acquire+0x1ab/0x510
[ 75.481514][ T6515] ? console_unlock+0x303/0xb70
[ 75.481536][ T6515] ? lock_release+0x720/0x720
[ 75.481558][ T6515] ? lock_downgrade+0x6e0/0x6e0
[ 75.481580][ T6515] ? do_raw_spin_lock+0x120/0x2b0
[ 75.481594][ T6515] ? rwlock_bug.part.0+0x90/0x90
[ 75.481610][ T6515] console_unlock+0x356/0xb70
[ 75.481623][ T6515] ? console_unlock+0x303/0xb70
[ 75.481638][ T6515] ? devkmsg_read+0x730/0x730
[ 75.481652][ T6515] ? lock_release+0x720/0x720
[ 75.481667][ T6515] ? vprintk+0x80/0x90
[ 75.481682][ T6515] vprintk_emit+0x198/0x4f0
[ 75.481696][ T6515] vprintk+0x80/0x90
[ 75.481710][ T6515] _printk+0xba/0xed
[ 75.481724][ T6515] ? record_print_text.cold+0x16/0x16
[ 75.481741][ T6515] ? ___ratelimit+0x222/0x4b0
[ 75.481757][ T6515] should_fail+0x472/0x5a0
[ 75.481769][ T6515] ? tty_buffer_alloc+0x23f/0x2a0
[ 75.481782][ T6515] should_failslab+0x5/0x10
[ 75.481795][ T6515] __kmalloc+0x72/0x340
[ 75.481809][ T6515] tty_buffer_alloc+0x23f/0x2a0
[ 75.481822][ T6515] __tty_buffer_request_room+0x156/0x2a0
[ 75.481838][ T6515] tty_insert_flip_string_fixed_flag+0x93/0x250
[ 75.481855][ T6515] pty_write+0x11c/0x1e0
[ 75.481869][ T6515] n_tty_write+0xa7a/0xfd0
[ 75.481887][ T6515] ? __sanitizer_cov_trace_cmp8+0x1d/0x70
[ 75.481905][ T6515] ? n_tty_receive_char+0x5b0/0x5b0
[ 75.481918][ T6515] ? __init_waitqueue_head+0xd0/0xd0
[ 75.481932][ T6515] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70
[ 75.481947][ T6515] ? __phys_addr+0xc4/0x140
[ 75.481961][ T6515] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70
[ 75.481976][ T6515] ? __phys_addr_symbol+0x2c/0x70
[ 75.481990][ T6515] ? __sanitizer_cov_trace_cmp8+0x1d/0x70
[ 75.482005][ T6515] ? __check_object_size+0x16e/0x3f0
[ 75.482019][ T6515] file_tty_write.constprop.0+0x526/0x910
[ 75.482035][ T6515] ? n_tty_receive_char+0x5b0/0x5b0
[ 75.482050][ T6515] new_sync_write+0x429/0x660
[ 75.482065][ T6515] ? new_sync_read+0x6e0/0x6e0
[ 75.482080][ T6515] ? x86_pmu_start+0x30/0x270
[ 75.482098][ T6515] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70
[ 75.482113][ T6515] ? security_file_permission+0xab/0xd0
[ 75.482130][ T6515] vfs_write+0x7cd/0xae0
[ 75.482142][ T6515] ksys_write+0x12d/0x250
[ 75.482153][ T6515] ? __ia32_sys_read+0xb0/0xb0
[ 75.482165][ T6515] ? syscall_enter_from_user_mode+0x21/0x70
[ 75.482182][ T6515] do_syscall_64+0x35/0xb0
[ 75.482194][ T6515] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 75.482211][ T6515] RIP: 0033:0x7f41ad8ca679
[ 75.482221][ T6515] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
[ 75.482233][ T6515] RSP: 002b:00007ffed0e96e38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 75.482245][ T6515] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f41ad8ca679
[ 75.482254][ T6515] RDX: 000000000000ff2e RSI: 0000000020000180 RDI: 0000000000000003
[ 75.482262][ T6515] RBP: 00007ffed0e96e40 R08: 0000000000000001 R09: 00007f41ad880033
[ 75.482270][ T6515] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
[ 75.482283][ T6515] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 75.482293][ T6515]
[ 76.392310][ T6515] CPU: 1 PID: 6515 Comm: syz-executor376 Not tainted 5.15.0-next-20211112-syzkaller #0
[ 76.401918][ T6515] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
[ 76.411953][ T6515] Call Trace:
[ 76.415217][ T6515]
[ 76.418138][ T6515] dump_stack_lvl+0xcd/0x134
[ 76.422716][ T6515] should_fail.cold+0x5/0xa
[ 76.427199][ T6515] ? tty_buffer_alloc+0x23f/0x2a0
[ 76.432217][ T6515] should_failslab+0x5/0x10
[ 76.436700][ T6515] __kmalloc+0x72/0x340
[ 76.440842][ T6515] tty_buffer_alloc+0x23f/0x2a0
[ 76.445688][ T6515] __tty_buffer_request_room+0x156/0x2a0
[ 76.451303][ T6515] tty_insert_flip_string_fixed_flag+0x93/0x250
[ 76.457547][ T6515] pty_write+0x11c/0x1e0
[ 76.461822][ T6515] n_tty_write+0xa7a/0xfd0
[ 76.466238][ T6515] ? __sanitizer_cov_trace_cmp8+0x1d/0x70
[ 76.471958][ T6515] ? n_tty_receive_char+0x5b0/0x5b0
[ 76.477141][ T6515] ? __init_waitqueue_head+0xd0/0xd0
[ 76.482410][ T6515] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70
[ 76.488631][ T6515] ? __phys_addr+0xc4/0x140
[ 76.493116][ T6515] ? __sanitizer_cov_trace_const_cmp8+0x1d/0x70
[ 76.499356][ T6515] ? __phys_addr_symbol+0x2c/0x70
[ 76.504374][ T6515] ? __sanitizer_cov_trace_cmp8+0x1d/0x70
[ 76.510082][ T6515] ? __check_object_size+0x16e/0x3f0
[ 76.515363][ T6515] file_tty_write.constprop.0+0x526/0x910
[ 76.521081][ T6515] ? n_tty_receive_char+0x5b0/0x5b0
[ 76.526266][ T6515] new_sync_write+0x429/0x660
[ 76.530931][ T6515] ? new_sync_read+0x6e0/0x6e0
[ 76.535679][ T6515] ? x86_pmu_start+0x30/0x270
[ 76.540361][ T6515] ? __sanitizer_cov_trace_const_cmp4+0x1c/0x70
[ 76.546586][ T6515] ? security_file_permission+0xab/0xd0
[ 76.552117][ T6515] vfs_write+0x7cd/0xae0
[ 76.556360][ T6515] ksys_write+0x12d/0x250
[ 76.560830][ T6515] ? __ia32_sys_read+0xb0/0xb0
[ 76.565590][ T6515] ? syscall_enter_from_user_mode+0x21/0x70
[ 76.571571][ T6515] do_syscall_64+0x35/0xb0
[ 76.575984][ T6515] entry_SYSCALL_64_after_hwframe+0x44/0xae
[ 76.581867][ T6515] RIP: 0033:0x7f41ad8ca679
[ 76.586269][ T6515] Code: 28 c3 e8 2a 14 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
[ 76.605862][ T6515] RSP: 002b:00007ffed0e96e38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[ 76.614702][ T6515] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f41ad8ca679
[ 76.622663][ T6515] RDX: 000000000000ff2e RSI: 0000000020000180 RDI: 0000000000000003
[ 76.630623][ T6515] RBP: 00007ffed0e96e40 R08: 0000000000000001 R09: 00007f41ad880033
[ 76.638674][ T6515] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004
[ 76.646623][ T6515] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 76.654597][ T6515]