Warning: Permanently added '10.128.0.72' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 58.084190] FAULT_INJECTION: forcing a failure. [ 58.084190] name failslab, interval 1, probability 0, space 0, times 1 [ 58.096248] CPU: 0 PID: 8100 Comm: syz-executor343 Not tainted 4.19.211-syzkaller #0 [ 58.104122] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 58.113458] Call Trace: [ 58.116029] dump_stack+0x1fc/0x2ef [ 58.119638] should_fail.cold+0xa/0xf [ 58.123418] ? setup_fault_attr+0x200/0x200 [ 58.127722] ? mark_held_locks+0xf0/0xf0 [ 58.131778] ? lock_acquire+0x170/0x3c0 [ 58.135741] __should_failslab+0x115/0x180 [ 58.139955] should_failslab+0x5/0x10 [ 58.143734] __kmalloc+0x6d/0x3c0 [ 58.147181] ? tty_buffer_alloc+0x23f/0x2a0 [ 58.151480] ? __mutex_lock+0x368/0x1190 [ 58.155520] tty_buffer_alloc+0x23f/0x2a0 [ 58.159693] __tty_buffer_request_room+0x156/0x2a0 [ 58.164622] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 58.170144] ? do_raw_spin_lock+0xcb/0x220 [ 58.175756] pty_write+0x126/0x1f0 [ 58.179295] n_tty_write+0xa03/0xff0 [ 58.182993] ? __ldsem_down_read_nested+0xd2/0x780 [ 58.187902] ? n_tty_open+0x160/0x160 [ 58.191693] ? do_wait_intr_irq+0x270/0x270 [ 58.196094] ? __might_fault+0x192/0x1d0 [ 58.200141] tty_write+0x496/0x810 [ 58.203669] ? n_tty_open+0x160/0x160 [ 58.207456] __vfs_write+0xf7/0x770 [ 58.211066] ? tty_compat_ioctl+0x270/0x270 [ 58.215367] ? common_file_perm+0x4e5/0x850 [ 58.219664] ? kernel_read+0x110/0x110 [ 58.223531] ? trace_hardirqs_off+0x64/0x200 [ 58.227917] ? apparmor_getprocattr+0x11e0/0x11e0 [ 58.232751] ? vfs_write+0x3d7/0x540 [ 58.236449] ? security_file_permission+0x1c0/0x220 [ 58.241479] vfs_write+0x1f3/0x540 [ 58.244998] ksys_write+0x12b/0x2a0 [ 58.248602] ? __ia32_sys_read+0xb0/0xb0 [ 58.252638] ? trace_hardirqs_off_caller+0x6e/0x210 [ 58.257633] ? do_syscall_64+0x21/0x620 [ 58.261588] do_syscall_64+0xf9/0x620 [ 58.265366] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.270621] RIP: 0033:0x7fd929d64679 [ 58.274319] 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 [ 58.293199] RSP: 002b:00007ffc4f545f18 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 58.300886] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fd929d64679 [ 58.308231] RDX: 000000000000ff2e RSI: 00000000200000c0 RDI: 0000000000000003 [ 58.315475] RBP: 00007ffc4f545f20 R08: 0000000000000001 R09: 00007fd929d20033 [ 58.322733] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 58.329978] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 58.337270] [ 58.337273] ====================================================== [ 58.337276] WARNING: possible circular locking dependency detected [ 58.337278] 4.19.211-syzkaller #0 Not tainted [ 58.337281] ------------------------------------------------------ [ 58.337284] syz-executor343/8100 is trying to acquire lock: [ 58.337286] 00000000da701f41 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 58.337293] [ 58.337295] but task is already holding lock: [ 58.337297] 00000000e08b11f7 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 58.337304] [ 58.337307] which lock already depends on the new lock. [ 58.337308] [ 58.337309] [ 58.337312] the existing dependency chain (in reverse order) is: [ 58.337313] [ 58.337314] -> #2 (&(&port->lock)->rlock){-.-.}: [ 58.337321] tty_port_tty_get+0x1d/0x80 [ 58.337324] tty_port_default_wakeup+0x11/0x40 [ 58.337326] serial8250_tx_chars+0x490/0xaf0 [ 58.337328] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 58.337331] serial8250_default_handle_irq+0xae/0x220 [ 58.337333] serial8250_interrupt+0x101/0x240 [ 58.337335] __handle_irq_event_percpu+0x27e/0x8e0 [ 58.337337] handle_irq_event+0x102/0x290 [ 58.337339] handle_edge_irq+0x260/0xcf0 [ 58.337341] handle_irq+0x35/0x50 [ 58.337343] do_IRQ+0x93/0x1c0 [ 58.337345] ret_from_intr+0x0/0x1e [ 58.337347] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 58.337349] uart_write+0x3bb/0x6f0 [ 58.337351] do_output_char+0x5de/0x850 [ 58.337353] n_tty_write+0x46e/0xff0 [ 58.337355] tty_write+0x496/0x810 [ 58.337357] redirected_tty_write+0xaa/0xb0 [ 58.337359] do_iter_write+0x461/0x5d0 [ 58.337361] vfs_writev+0x153/0x2e0 [ 58.337363] do_writev+0x136/0x330 [ 58.337365] do_syscall_64+0xf9/0x620 [ 58.337367] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.337369] [ 58.337370] -> #1 (&port_lock_key){-.-.}: [ 58.337377] serial8250_console_write+0x90e/0xb70 [ 58.337379] console_unlock+0xbb6/0x1110 [ 58.337381] vprintk_emit+0x2d1/0x740 [ 58.337383] vprintk_func+0x79/0x180 [ 58.337385] printk+0xba/0xed [ 58.337387] register_console+0x87f/0xc90 [ 58.337389] univ8250_console_init+0x3a/0x46 [ 58.337391] console_init+0x4cb/0x718 [ 58.337393] start_kernel+0x686/0x911 [ 58.337395] secondary_startup_64+0xa4/0xb0 [ 58.337396] [ 58.337397] -> #0 (console_owner){....}: [ 58.337404] console_unlock+0x411/0x1110 [ 58.337406] vprintk_emit+0x2d1/0x740 [ 58.337408] vprintk_func+0x79/0x180 [ 58.337410] printk+0xba/0xed [ 58.337412] should_fail+0x66b/0x7b0 [ 58.337414] __should_failslab+0x115/0x180 [ 58.337416] should_failslab+0x5/0x10 [ 58.337418] __kmalloc+0x6d/0x3c0 [ 58.337420] tty_buffer_alloc+0x23f/0x2a0 [ 58.337422] __tty_buffer_request_room+0x156/0x2a0 [ 58.337425] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 58.337427] pty_write+0x126/0x1f0 [ 58.337429] n_tty_write+0xa03/0xff0 [ 58.337431] tty_write+0x496/0x810 [ 58.337433] __vfs_write+0xf7/0x770 [ 58.337435] vfs_write+0x1f3/0x540 [ 58.337437] ksys_write+0x12b/0x2a0 [ 58.337439] do_syscall_64+0xf9/0x620 [ 58.337441] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.337442] [ 58.337444] other info that might help us debug this: [ 58.337445] [ 58.337447] Chain exists of: [ 58.337448] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 58.337457] [ 58.337459] Possible unsafe locking scenario: [ 58.337460] [ 58.337462] CPU0 CPU1 [ 58.337464] ---- ---- [ 58.337466] lock(&(&port->lock)->rlock); [ 58.337471] lock(&port_lock_key); [ 58.337475] lock(&(&port->lock)->rlock); [ 58.337479] lock(console_owner); [ 58.337483] [ 58.337485] *** DEADLOCK *** [ 58.337486] [ 58.337488] 6 locks held by syz-executor343/8100: [ 58.337489] #0: 00000000e1ff0906 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 58.337498] #1: 0000000075685dd5 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 58.337506] #2: 00000000d6cfaff7 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 58.337515] #3: 0000000063d52f30 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 58.337523] #4: 00000000e08b11f7 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 58.337531] #5: 0000000024b652b3 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 58.337540] [ 58.337541] stack backtrace: [ 58.337545] CPU: 0 PID: 8100 Comm: syz-executor343 Not tainted 4.19.211-syzkaller #0 [ 58.337548] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 58.337550] Call Trace: [ 58.337552] dump_stack+0x1fc/0x2ef [ 58.337555] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 58.337557] __lock_acquire+0x30c9/0x3ff0 [ 58.337559] ? mark_held_locks+0xf0/0xf0 [ 58.337561] ? snprintf+0xf0/0xf0 [ 58.337563] ? console_unlock+0x3ec/0x1110 [ 58.337565] lock_acquire+0x170/0x3c0 [ 58.337567] ? console_unlock+0x3a9/0x1110 [ 58.337569] console_unlock+0x411/0x1110 [ 58.337571] ? console_unlock+0x3a9/0x1110 [ 58.337573] vprintk_emit+0x2d1/0x740 [ 58.337575] vprintk_func+0x79/0x180 [ 58.337577] printk+0xba/0xed [ 58.337579] ? log_store.cold+0x16/0x16 [ 58.337581] ? set_next_entity+0xb52/0x1dc0 [ 58.337583] ? __lock_acquire+0x6de/0x3ff0 [ 58.337585] ? ___ratelimit+0x319/0x590 [ 58.337587] should_fail+0x66b/0x7b0 [ 58.337589] ? setup_fault_attr+0x200/0x200 [ 58.337591] ? mark_held_locks+0xf0/0xf0 [ 58.337593] ? lock_acquire+0x170/0x3c0 [ 58.337595] __should_failslab+0x115/0x180 [ 58.337597] should_failslab+0x5/0x10 [ 58.337599] __kmalloc+0x6d/0x3c0 [ 58.337601] ? tty_buffer_alloc+0x23f/0x2a0 [ 58.337603] ? __mutex_lock+0x368/0x1190 [ 58.337605] tty_buffer_alloc+0x23f/0x2a0 [ 58.337607] __tty_buffer_request_room+0x156/0x2a0 [ 58.337610] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 58.337612] ? do_raw_spin_lock+0xcb/0x220 [ 58.337614] pty_write+0x126/0x1f0 [ 58.337616] n_tty_write+0xa03/0xff0 [ 58.337618] ? __ldsem_down_read_nested+0xd2/0x780 [ 58.337620] ? n_tty_open+0x160/0x160 [ 58.337622] ? do_wait_intr_irq+0x270/0x270 [ 58.337624] ? __might_fault+0x192/0x1d0 [ 58.337626] tty_write+0x496/0x810 [ 58.337628] ? n_tty_open+0x160/0x160 [ 58.337630] __vfs_write+0xf7/0x770 [ 58.337632] ? tty_compat_ioctl+0x270/0x270 [ 58.337634] ? common_file_perm+0x4e5/0x850 [ 58.337636] ? kernel_read+0x110/0x110 [ 58.337638] ? trace_hardirqs_off+0x64/0x200 [ 58.337641] ? apparmor_getprocattr+0x11e0/0x11e0 [ 58.337643] ? vfs_write+0x3d7/0x540 [ 58.337645] ? security_file_permission+0x1c0/0x220 [ 58.337647] vfs_write+0x1f3/0x540 [ 58.337649] ksys_write+0x12b/0x2a0 [ 58.337651] ? __ia32_sys_read+0xb0/0xb0 [ 58.337653] ? trace_hardirqs_off_caller+0x6e/0x210 [ 58.337655] ? do_syscall_64+0x21/0x620 [ 58.337657] do_syscall_64+0xf9/0x620 [ 58.337660] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 58.337661] RIP: 0033:0x7fd929d64679 [ 58.337668] 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 [ 58.337671] RSP: 002b:00007ffc4f545f18 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 58.337676] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fd929d64679 [ 58.337679] RDX: 000000000000ff2e RSI: 00000000200000c0 RDI: 0000000000000003 [ 58.337682] RBP: 00007ffc4f545f20 R08: 0000000000000001 R09: 00007fd929d20033 [ 58.337685] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 58.337688] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000