Warning: Permanently added '10.128.0.3' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 35.767541] FAULT_INJECTION: forcing a failure. [ 35.767541] name failslab, interval 1, probability 0, space 0, times 1 [ 35.780235] CPU: 0 PID: 8131 Comm: syz-executor148 Not tainted 4.19.211-syzkaller #0 [ 35.788181] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 35.797603] Call Trace: [ 35.800173] dump_stack+0x1fc/0x2ef [ 35.803778] should_fail.cold+0xa/0xf [ 35.807567] ? setup_fault_attr+0x200/0x200 [ 35.811869] ? mark_held_locks+0xf0/0xf0 [ 35.815923] ? lock_acquire+0x170/0x3c0 [ 35.819873] __should_failslab+0x115/0x180 [ 35.824098] should_failslab+0x5/0x10 [ 35.827913] __kmalloc+0x6d/0x3c0 [ 35.831353] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.835672] ? __mutex_lock+0x368/0x1190 [ 35.839721] tty_buffer_alloc+0x23f/0x2a0 [ 35.843855] __tty_buffer_request_room+0x156/0x2a0 [ 35.848767] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.854292] ? do_raw_spin_lock+0xcb/0x220 [ 35.858505] pty_write+0x126/0x1f0 [ 35.862037] n_tty_write+0xa03/0xff0 [ 35.865728] ? __ldsem_down_read_nested+0xd2/0x780 [ 35.870636] ? n_tty_open+0x160/0x160 [ 35.874415] ? do_wait_intr_irq+0x270/0x270 [ 35.878748] ? __might_fault+0x192/0x1d0 [ 35.882792] tty_write+0x496/0x810 [ 35.886325] ? n_tty_open+0x160/0x160 [ 35.890123] __vfs_write+0xf7/0x770 [ 35.893742] ? tty_compat_ioctl+0x270/0x270 [ 35.898049] ? common_file_perm+0x4e5/0x850 [ 35.902354] ? kernel_read+0x110/0x110 [ 35.906231] ? trace_hardirqs_off+0x64/0x200 [ 35.910645] ? apparmor_getprocattr+0x11e0/0x11e0 [ 35.915471] ? vfs_write+0x3d7/0x540 [ 35.919177] ? security_file_permission+0x1c0/0x220 [ 35.924181] vfs_write+0x1f3/0x540 [ 35.927709] ksys_write+0x12b/0x2a0 [ 35.931318] ? __ia32_sys_read+0xb0/0xb0 [ 35.935361] ? trace_hardirqs_off_caller+0x6e/0x210 [ 35.940357] ? do_syscall_64+0x21/0x620 [ 35.944311] do_syscall_64+0xf9/0x620 [ 35.948120] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.953296] RIP: 0033:0x7ff9843c6679 [ 35.957100] 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 [ 35.976077] RSP: 002b:00007ffcee326f98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 35.983761] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007ff9843c6679 [ 35.991007] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 35.998254] RBP: 00007ffcee326fa0 R08: 0000000000000001 R09: 00007ff984380033 [ 36.005514] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 36.012790] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 36.020159] [ 36.020162] ====================================================== [ 36.020165] WARNING: possible circular locking dependency detected [ 36.020167] 4.19.211-syzkaller #0 Not tainted [ 36.020170] ------------------------------------------------------ [ 36.020173] syz-executor148/8131 is trying to acquire lock: [ 36.020175] 00000000f3cc262e (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 36.020182] [ 36.020184] but task is already holding lock: [ 36.020186] 000000007a1c5aed (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 36.020193] [ 36.020196] which lock already depends on the new lock. [ 36.020197] [ 36.020198] [ 36.020201] the existing dependency chain (in reverse order) is: [ 36.020202] [ 36.020203] -> #2 (&(&port->lock)->rlock){-.-.}: [ 36.020211] tty_port_tty_get+0x1d/0x80 [ 36.020213] tty_port_default_wakeup+0x11/0x40 [ 36.020215] serial8250_tx_chars+0x490/0xaf0 [ 36.020218] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 36.020220] serial8250_default_handle_irq+0xae/0x220 [ 36.020222] serial8250_interrupt+0x101/0x240 [ 36.020225] __handle_irq_event_percpu+0x27e/0x8e0 [ 36.020227] handle_irq_event+0x102/0x290 [ 36.020229] handle_edge_irq+0x260/0xcf0 [ 36.020231] handle_irq+0x35/0x50 [ 36.020232] do_IRQ+0x93/0x1c0 [ 36.020234] ret_from_intr+0x0/0x1e [ 36.020237] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 36.020239] uart_write+0x3bb/0x6f0 [ 36.020241] do_output_char+0x5de/0x850 [ 36.020243] n_tty_write+0x46e/0xff0 [ 36.020244] tty_write+0x496/0x810 [ 36.020247] redirected_tty_write+0xaa/0xb0 [ 36.020249] do_iter_write+0x461/0x5d0 [ 36.020251] vfs_writev+0x153/0x2e0 [ 36.020252] do_writev+0x136/0x330 [ 36.020255] do_syscall_64+0xf9/0x620 [ 36.020257] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.020258] [ 36.020259] -> #1 (&port_lock_key){-.-.}: [ 36.020267] serial8250_console_write+0x90e/0xb70 [ 36.020269] console_unlock+0xbb6/0x1110 [ 36.020271] vprintk_emit+0x2d1/0x740 [ 36.020272] vprintk_func+0x79/0x180 [ 36.020274] printk+0xba/0xed [ 36.020276] register_console+0x87f/0xc90 [ 36.020279] univ8250_console_init+0x3a/0x46 [ 36.020281] console_init+0x4cb/0x718 [ 36.020283] start_kernel+0x686/0x911 [ 36.020285] secondary_startup_64+0xa4/0xb0 [ 36.020286] [ 36.020287] -> #0 (console_owner){....}: [ 36.020294] console_unlock+0x411/0x1110 [ 36.020296] vprintk_emit+0x2d1/0x740 [ 36.020298] vprintk_func+0x79/0x180 [ 36.020300] printk+0xba/0xed [ 36.020302] should_fail+0x66b/0x7b0 [ 36.020304] __should_failslab+0x115/0x180 [ 36.020306] should_failslab+0x5/0x10 [ 36.020308] __kmalloc+0x6d/0x3c0 [ 36.020310] tty_buffer_alloc+0x23f/0x2a0 [ 36.020312] __tty_buffer_request_room+0x156/0x2a0 [ 36.020315] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 36.020317] pty_write+0x126/0x1f0 [ 36.020319] n_tty_write+0xa03/0xff0 [ 36.020320] tty_write+0x496/0x810 [ 36.020322] __vfs_write+0xf7/0x770 [ 36.020324] vfs_write+0x1f3/0x540 [ 36.020326] ksys_write+0x12b/0x2a0 [ 36.020328] do_syscall_64+0xf9/0x620 [ 36.020331] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.020332] [ 36.020334] other info that might help us debug this: [ 36.020335] [ 36.020337] Chain exists of: [ 36.020338] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 36.020347] [ 36.020349] Possible unsafe locking scenario: [ 36.020350] [ 36.020352] CPU0 CPU1 [ 36.020354] ---- ---- [ 36.020355] lock(&(&port->lock)->rlock); [ 36.020360] lock(&port_lock_key); [ 36.020365] lock(&(&port->lock)->rlock); [ 36.020369] lock(console_owner); [ 36.020373] [ 36.020374] *** DEADLOCK *** [ 36.020376] [ 36.020378] 6 locks held by syz-executor148/8131: [ 36.020379] #0: 00000000400037f3 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 36.020387] #1: 000000002ce7cae4 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 36.020396] #2: 00000000c3c9d692 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 36.020404] #3: 000000005aa82218 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 36.020413] #4: 000000007a1c5aed (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 36.020421] #5: 0000000049ae9cc7 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 36.020429] [ 36.020431] stack backtrace: [ 36.020434] CPU: 0 PID: 8131 Comm: syz-executor148 Not tainted 4.19.211-syzkaller #0 [ 36.020438] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 36.020440] Call Trace: [ 36.020442] dump_stack+0x1fc/0x2ef [ 36.020444] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 36.020446] __lock_acquire+0x30c9/0x3ff0 [ 36.020448] ? mark_held_locks+0xf0/0xf0 [ 36.020450] ? snprintf+0xf0/0xf0 [ 36.020452] ? console_unlock+0x3ec/0x1110 [ 36.020454] lock_acquire+0x170/0x3c0 [ 36.020457] ? console_unlock+0x3a9/0x1110 [ 36.020459] console_unlock+0x411/0x1110 [ 36.020461] ? console_unlock+0x3a9/0x1110 [ 36.020463] vprintk_emit+0x2d1/0x740 [ 36.020465] vprintk_func+0x79/0x180 [ 36.020466] printk+0xba/0xed [ 36.020468] ? log_store.cold+0x16/0x16 [ 36.020470] ? try_to_wake_up+0x733/0x1050 [ 36.020472] ? __lock_acquire+0x6de/0x3ff0 [ 36.020474] ? ___ratelimit+0x319/0x590 [ 36.020476] should_fail+0x66b/0x7b0 [ 36.020479] ? setup_fault_attr+0x200/0x200 [ 36.020481] ? mark_held_locks+0xf0/0xf0 [ 36.020483] ? lock_acquire+0x170/0x3c0 [ 36.020485] __should_failslab+0x115/0x180 [ 36.020487] should_failslab+0x5/0x10 [ 36.020488] __kmalloc+0x6d/0x3c0 [ 36.020491] ? tty_buffer_alloc+0x23f/0x2a0 [ 36.020493] ? __mutex_lock+0x368/0x1190 [ 36.020495] tty_buffer_alloc+0x23f/0x2a0 [ 36.020497] __tty_buffer_request_room+0x156/0x2a0 [ 36.020500] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 36.020502] ? do_raw_spin_lock+0xcb/0x220 [ 36.020504] pty_write+0x126/0x1f0 [ 36.020505] n_tty_write+0xa03/0xff0 [ 36.020508] ? __ldsem_down_read_nested+0xd2/0x780 [ 36.020510] ? n_tty_open+0x160/0x160 [ 36.020512] ? do_wait_intr_irq+0x270/0x270 [ 36.020514] ? __might_fault+0x192/0x1d0 [ 36.020516] tty_write+0x496/0x810 [ 36.020518] ? n_tty_open+0x160/0x160 [ 36.020520] __vfs_write+0xf7/0x770 [ 36.020522] ? tty_compat_ioctl+0x270/0x270 [ 36.020524] ? common_file_perm+0x4e5/0x850 [ 36.020526] ? kernel_read+0x110/0x110 [ 36.020528] ? trace_hardirqs_off+0x64/0x200 [ 36.020530] ? apparmor_getprocattr+0x11e0/0x11e0 [ 36.020532] ? vfs_write+0x3d7/0x540 [ 36.020535] ? security_file_permission+0x1c0/0x220 [ 36.020537] vfs_write+0x1f3/0x540 [ 36.020538] ksys_write+0x12b/0x2a0 [ 36.020541] ? __ia32_sys_read+0xb0/0xb0 [ 36.020543] ? trace_hardirqs_off_caller+0x6e/0x210 [ 36.020545] ? do_syscall_64+0x21/0x620 [ 36.020547] do_syscall_64+0xf9/0x620 [ 36.020549] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 36.020551] RIP: 0033:0x7ff9843c6679 [ 36.020558] 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 [ 36.020561] RSP: 002b:00007ffcee326f98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 36.020566] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007ff9843c6679 [ 36.020569] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 36.020572] RBP: 00007ffcee326fa0 R08: 0000000000000001 R09: 00007ff984380033 [ 36.020575] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 36.020578] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000