Warning: Permanently added '10.128.1.152' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 35.441516] FAULT_INJECTION: forcing a failure. [ 35.441516] name failslab, interval 1, probability 0, space 0, times 1 [ 35.453954] CPU: 0 PID: 8135 Comm: syz-executor240 Not tainted 4.19.211-syzkaller #0 [ 35.461823] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 35.471155] Call Trace: [ 35.473732] dump_stack+0x1fc/0x2ef [ 35.477341] should_fail.cold+0xa/0xf [ 35.481141] ? setup_fault_attr+0x200/0x200 [ 35.485442] ? mark_held_locks+0xf0/0xf0 [ 35.489478] ? mark_held_locks+0xf0/0xf0 [ 35.493520] __should_failslab+0x115/0x180 [ 35.497759] should_failslab+0x5/0x10 [ 35.501549] __kmalloc+0x6d/0x3c0 [ 35.504986] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.509301] tty_buffer_alloc+0x23f/0x2a0 [ 35.513486] __tty_buffer_request_room+0x156/0x2a0 [ 35.518408] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.524194] ? do_raw_spin_lock+0xcb/0x220 [ 35.528428] pty_write+0x126/0x1f0 [ 35.531957] tty_put_char+0x122/0x150 [ 35.535739] ? dev_match_devt+0x90/0x90 [ 35.539690] ? tty_buffer_space_avail+0x7e/0xb0 [ 35.544335] ? pty_write_room+0xbe/0xe0 [ 35.548288] ? ptmx_open+0x350/0x350 [ 35.551982] __process_echoes+0x577/0x9f0 [ 35.556146] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.561064] ? n_tty_receive_buf2+0x40/0x40 [ 35.565372] tty_ioctl+0x1026/0x1630 [ 35.569065] ? tty_fasync+0x300/0x300 [ 35.572846] ? get_pid_task+0xf4/0x190 [ 35.576735] ? proc_fail_nth_write+0x95/0x1d0 [ 35.581209] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.586206] ? debug_check_no_obj_freed+0x201/0x490 [ 35.591200] ? __vfs_write+0xff/0x770 [ 35.594986] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.599906] ? common_file_perm+0x4e5/0x850 [ 35.604214] ? tty_fasync+0x300/0x300 [ 35.608016] do_vfs_ioctl+0xcdb/0x12e0 [ 35.611890] ? vfs_write+0x3d7/0x540 [ 35.615710] ? ioctl_preallocate+0x200/0x200 [ 35.620115] ? lock_downgrade+0x720/0x720 [ 35.624253] ? check_preemption_disabled+0x41/0x280 [ 35.629260] ? vfs_write+0x393/0x540 [ 35.632956] ? ksys_write+0x1c8/0x2a0 [ 35.636742] ksys_ioctl+0x9b/0xc0 [ 35.640188] __x64_sys_ioctl+0x6f/0xb0 [ 35.644064] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.648641] do_syscall_64+0xf9/0x620 [ 35.652426] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.657597] RIP: 0033:0x7fd29dc28789 [ 35.661287] 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.680284] RSP: 002b:00007ffcf101fee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.687989] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fd29dc28789 [ 35.695241] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 0000000000000004 [ 35.702497] RBP: 00007ffcf101ff00 R08: 0000000000000001 R09: 0000000000000001 [ 35.709744] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000005 [ 35.716992] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 35.724265] [ 35.724268] ====================================================== [ 35.724271] WARNING: possible circular locking dependency detected [ 35.724273] 4.19.211-syzkaller #0 Not tainted [ 35.724276] ------------------------------------------------------ [ 35.724278] syz-executor240/8135 is trying to acquire lock: [ 35.724280] 0000000042706e41 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 35.724288] [ 35.724290] but task is already holding lock: [ 35.724292] 000000007588e772 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.724299] [ 35.724302] which lock already depends on the new lock. [ 35.724303] [ 35.724304] [ 35.724307] the existing dependency chain (in reverse order) is: [ 35.724308] [ 35.724309] -> #2 (&(&port->lock)->rlock){-.-.}: [ 35.724316] tty_port_tty_get+0x1d/0x80 [ 35.724318] tty_port_default_wakeup+0x11/0x40 [ 35.724321] serial8250_tx_chars+0x490/0xaf0 [ 35.724323] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 35.724325] serial8250_default_handle_irq+0xae/0x220 [ 35.724328] serial8250_interrupt+0x101/0x240 [ 35.724330] __handle_irq_event_percpu+0x27e/0x8e0 [ 35.724332] handle_irq_event+0x102/0x290 [ 35.724334] handle_edge_irq+0x260/0xcf0 [ 35.724336] handle_irq+0x35/0x50 [ 35.724338] do_IRQ+0x93/0x1c0 [ 35.724340] ret_from_intr+0x0/0x1e [ 35.724342] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 35.724344] uart_write+0x3bb/0x6f0 [ 35.724346] do_output_char+0x5de/0x850 [ 35.724348] n_tty_write+0x46e/0xff0 [ 35.724350] tty_write+0x496/0x810 [ 35.724352] redirected_tty_write+0xaa/0xb0 [ 35.724354] do_iter_write+0x461/0x5d0 [ 35.724356] vfs_writev+0x153/0x2e0 [ 35.724358] do_writev+0x136/0x330 [ 35.724360] do_syscall_64+0xf9/0x620 [ 35.724362] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.724363] [ 35.724365] -> #1 (&port_lock_key){-.-.}: [ 35.724372] serial8250_console_write+0x90e/0xb70 [ 35.724374] console_unlock+0xbb6/0x1110 [ 35.724376] vprintk_emit+0x2d1/0x740 [ 35.724378] vprintk_func+0x79/0x180 [ 35.724380] printk+0xba/0xed [ 35.724382] register_console+0x87f/0xc90 [ 35.724384] univ8250_console_init+0x3a/0x46 [ 35.724386] console_init+0x4cb/0x718 [ 35.724388] start_kernel+0x686/0x911 [ 35.724390] secondary_startup_64+0xa4/0xb0 [ 35.724391] [ 35.724392] -> #0 (console_owner){....}: [ 35.724399] console_unlock+0x411/0x1110 [ 35.724401] vprintk_emit+0x2d1/0x740 [ 35.724403] vprintk_func+0x79/0x180 [ 35.724405] printk+0xba/0xed [ 35.724407] should_fail+0x66b/0x7b0 [ 35.724409] __should_failslab+0x115/0x180 [ 35.724411] should_failslab+0x5/0x10 [ 35.724413] __kmalloc+0x6d/0x3c0 [ 35.724415] tty_buffer_alloc+0x23f/0x2a0 [ 35.724418] __tty_buffer_request_room+0x156/0x2a0 [ 35.724420] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.724422] pty_write+0x126/0x1f0 [ 35.724424] tty_put_char+0x122/0x150 [ 35.724426] __process_echoes+0x577/0x9f0 [ 35.724429] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.724431] tty_ioctl+0x1026/0x1630 [ 35.724433] do_vfs_ioctl+0xcdb/0x12e0 [ 35.724435] ksys_ioctl+0x9b/0xc0 [ 35.724437] __x64_sys_ioctl+0x6f/0xb0 [ 35.724439] do_syscall_64+0xf9/0x620 [ 35.724441] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.724442] [ 35.724444] other info that might help us debug this: [ 35.724445] [ 35.724447] Chain exists of: [ 35.724448] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 35.724457] [ 35.724459] Possible unsafe locking scenario: [ 35.724460] [ 35.724462] CPU0 CPU1 [ 35.724465] ---- ---- [ 35.724466] lock(&(&port->lock)->rlock); [ 35.724471] lock(&port_lock_key); [ 35.724475] lock(&(&port->lock)->rlock); [ 35.724480] lock(console_owner); [ 35.724483] [ 35.724485] *** DEADLOCK *** [ 35.724486] [ 35.724488] 6 locks held by syz-executor240/8135: [ 35.724489] #0: 00000000ed15d106 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 35.724498] #1: 00000000975b018f (&port->buf.lock/1){+.+.}, at: tty_ioctl+0xfbc/0x1630 [ 35.724507] #2: 000000001d6a8d2a (&o_tty->termios_rwsem/1){++++}, at: n_tty_receive_buf_common+0x84/0x2a90 [ 35.724517] #3: 0000000079f5e625 (&ldata->output_lock){+.+.}, at: n_tty_receive_buf_common+0xbce/0x2a90 [ 35.724526] #4: 000000007588e772 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 35.724535] #5: 00000000056a2cb0 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 35.724543] [ 35.724544] stack backtrace: [ 35.724548] CPU: 0 PID: 8135 Comm: syz-executor240 Not tainted 4.19.211-syzkaller #0 [ 35.724552] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 [ 35.724553] Call Trace: [ 35.724555] dump_stack+0x1fc/0x2ef [ 35.724558] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 35.724560] __lock_acquire+0x30c9/0x3ff0 [ 35.724562] ? mark_held_locks+0xf0/0xf0 [ 35.724564] ? snprintf+0xf0/0xf0 [ 35.724566] ? console_unlock+0x3ec/0x1110 [ 35.724568] lock_acquire+0x170/0x3c0 [ 35.724570] ? console_unlock+0x3a9/0x1110 [ 35.724572] console_unlock+0x411/0x1110 [ 35.724574] ? console_unlock+0x3a9/0x1110 [ 35.724576] vprintk_emit+0x2d1/0x740 [ 35.724578] vprintk_func+0x79/0x180 [ 35.724580] printk+0xba/0xed [ 35.724582] ? log_store.cold+0x16/0x16 [ 35.724584] ? __lock_acquire+0x22f9/0x3ff0 [ 35.724586] ? ___ratelimit+0x319/0x590 [ 35.724588] should_fail+0x66b/0x7b0 [ 35.724590] ? setup_fault_attr+0x200/0x200 [ 35.724592] ? mark_held_locks+0xf0/0xf0 [ 35.724594] ? mark_held_locks+0xf0/0xf0 [ 35.724596] __should_failslab+0x115/0x180 [ 35.724598] should_failslab+0x5/0x10 [ 35.724600] __kmalloc+0x6d/0x3c0 [ 35.724602] ? tty_buffer_alloc+0x23f/0x2a0 [ 35.724604] tty_buffer_alloc+0x23f/0x2a0 [ 35.724607] __tty_buffer_request_room+0x156/0x2a0 [ 35.724609] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 35.724611] ? do_raw_spin_lock+0xcb/0x220 [ 35.724613] pty_write+0x126/0x1f0 [ 35.724615] tty_put_char+0x122/0x150 [ 35.724617] ? dev_match_devt+0x90/0x90 [ 35.724619] ? tty_buffer_space_avail+0x7e/0xb0 [ 35.724621] ? pty_write_room+0xbe/0xe0 [ 35.724623] ? ptmx_open+0x350/0x350 [ 35.724625] __process_echoes+0x577/0x9f0 [ 35.724628] n_tty_receive_buf_common+0xc0c/0x2a90 [ 35.724630] ? n_tty_receive_buf2+0x40/0x40 [ 35.724632] tty_ioctl+0x1026/0x1630 [ 35.724634] ? tty_fasync+0x300/0x300 [ 35.724636] ? get_pid_task+0xf4/0x190 [ 35.724638] ? proc_fail_nth_write+0x95/0x1d0 [ 35.724640] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.724643] ? debug_check_no_obj_freed+0x201/0x490 [ 35.724645] ? __vfs_write+0xff/0x770 [ 35.724647] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 35.724649] ? common_file_perm+0x4e5/0x850 [ 35.724651] ? tty_fasync+0x300/0x300 [ 35.724653] do_vfs_ioctl+0xcdb/0x12e0 [ 35.724655] ? vfs_write+0x3d7/0x540 [ 35.724657] ? ioctl_preallocate+0x200/0x200 [ 35.724659] ? lock_downgrade+0x720/0x720 [ 35.724662] ? check_preemption_disabled+0x41/0x280 [ 35.724664] ? vfs_write+0x393/0x540 [ 35.724665] ? ksys_write+0x1c8/0x2a0 [ 35.724667] ksys_ioctl+0x9b/0xc0 [ 35.724669] __x64_sys_ioctl+0x6f/0xb0 [ 35.724672] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 35.724674] do_syscall_64+0xf9/0x620 [ 35.724676] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 35.724678] RIP: 0033:0x7fd29dc28789 [ 35.724685] 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.724687] RSP: 002b:00007ffcf101fee8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 35.724692] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fd29dc28789 [ 35.724696] RDX: 0000000020000140 RSI: 0000000000005412 RDI: 0000000000000004 [ 35.724699] RBP: 00007ffcf101ff00 R08: 0000000000000001 R09: