Warning: Permanently added '10.128.10.42' (ECDSA) to the list of known hosts. executing program [ 43.079319] FAULT_INJECTION: forcing a failure. [ 43.079319] name failslab, interval 1, probability 0, space 0, times 1 [ 43.091465] CPU: 1 PID: 8112 Comm: syz-executor150 Not tainted 4.19.211-syzkaller #0 [ 43.099696] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 43.109038] Call Trace: [ 43.111703] dump_stack+0x1fc/0x2ef [ 43.115399] should_fail.cold+0xa/0xf [ 43.119376] ? setup_fault_attr+0x200/0x200 [ 43.123688] ? __lock_acquire+0x6de/0x3ff0 [ 43.128016] ? mark_held_locks+0xf0/0xf0 [ 43.132065] __should_failslab+0x115/0x180 [ 43.136648] should_failslab+0x5/0x10 [ 43.140656] __kmalloc+0x6d/0x3c0 [ 43.144475] ? tty_buffer_alloc+0x23f/0x2a0 [ 43.149048] tty_buffer_alloc+0x23f/0x2a0 [ 43.153184] __tty_buffer_request_room+0x156/0x2a0 [ 43.158185] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 43.163806] ? do_raw_spin_lock+0xcb/0x220 [ 43.168041] pty_write+0x126/0x1f0 [ 43.171755] tty_send_xchar+0x28d/0x3b0 [ 43.175712] ? tty_write_message+0x140/0x140 [ 43.180474] ? _kstrtoull+0x297/0x540 [ 43.184346] n_tty_ioctl_helper+0x18d/0x3a0 [ 43.188656] n_tty_ioctl+0x56/0x360 [ 43.192268] tty_ioctl+0x65d/0x1630 [ 43.195875] ? n_tty_poll+0x8f0/0x8f0 [ 43.199748] ? tty_fasync+0x300/0x300 [ 43.203728] ? get_pid_task+0xf4/0x190 [ 43.207712] ? proc_fail_nth_write+0x95/0x1d0 [ 43.212188] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 43.217096] ? debug_check_no_obj_freed+0x201/0x490 [ 43.222096] ? __vfs_write+0xff/0x770 [ 43.225878] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 43.230889] ? common_file_perm+0x4e5/0x850 [ 43.235206] ? tty_fasync+0x300/0x300 [ 43.239454] do_vfs_ioctl+0xcdb/0x12e0 [ 43.243502] ? vfs_write+0x3d7/0x540 [ 43.247195] ? ioctl_preallocate+0x200/0x200 [ 43.251672] ? lock_downgrade+0x720/0x720 [ 43.255841] ? check_preemption_disabled+0x41/0x280 [ 43.260839] ? vfs_write+0x393/0x540 [ 43.264533] ? ksys_write+0x1c8/0x2a0 [ 43.268584] ksys_ioctl+0x9b/0xc0 [ 43.272135] __x64_sys_ioctl+0x6f/0xb0 [ 43.276108] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 43.280760] do_syscall_64+0xf9/0x620 [ 43.284549] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.289894] RIP: 0033:0x7ffa28e5f679 [ 43.293586] 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 [ 43.312814] RSP: 002b:00007ffd8d5ad018 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 [ 43.320714] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007ffa28e5f679 [ 43.328444] RDX: 0000000000000003 RSI: 000000000000540a RDI: 0000000000000003 [ 43.335855] RBP: 00007ffd8d5ad020 R08: 0000000000000001 R09: 00007ffa28e20031 [ 43.343111] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 43.350658] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 43.357938] [ 43.357941] ====================================================== [ 43.357944] WARNING: possible circular locking dependency detected [ 43.357946] 4.19.211-syzkaller #0 Not tainted [ 43.357949] ------------------------------------------------------ [ 43.357952] syz-executor150/8112 is trying to acquire lock: [ 43.357953] 0000000077c1c416 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 43.357961] [ 43.357963] but task is already holding lock: [ 43.357965] 00000000bfac6dbc (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 43.357972] [ 43.357974] which lock already depends on the new lock. [ 43.357975] [ 43.357977] [ 43.357979] the existing dependency chain (in reverse order) is: [ 43.357980] [ 43.357982] -> #2 (&(&port->lock)->rlock){-.-.}: [ 43.357989] tty_port_tty_get+0x1d/0x80 [ 43.357991] tty_port_default_wakeup+0x11/0x40 [ 43.357993] serial8250_tx_chars+0x490/0xaf0 [ 43.357996] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 43.357998] serial8250_default_handle_irq+0xae/0x220 [ 43.358001] serial8250_interrupt+0x101/0x240 [ 43.358003] __handle_irq_event_percpu+0x27e/0x8e0 [ 43.358005] handle_irq_event+0x102/0x290 [ 43.358007] handle_edge_irq+0x260/0xcf0 [ 43.358009] handle_irq+0x35/0x50 [ 43.358011] do_IRQ+0x93/0x1c0 [ 43.358013] ret_from_intr+0x0/0x1e [ 43.358015] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 43.358017] uart_write+0x3bb/0x6f0 [ 43.358019] do_output_char+0x5de/0x850 [ 43.358021] n_tty_write+0x46e/0xff0 [ 43.358023] tty_write+0x496/0x810 [ 43.358025] redirected_tty_write+0xaa/0xb0 [ 43.358027] do_iter_write+0x461/0x5d0 [ 43.358029] vfs_writev+0x153/0x2e0 [ 43.358031] do_writev+0x136/0x330 [ 43.358033] do_syscall_64+0xf9/0x620 [ 43.358035] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.358036] [ 43.358038] -> #1 (&port_lock_key){-.-.}: [ 43.358045] serial8250_console_write+0x90e/0xb70 [ 43.358047] console_unlock+0xbb6/0x1110 [ 43.358049] vprintk_emit+0x2d1/0x740 [ 43.358051] vprintk_func+0x79/0x180 [ 43.358053] printk+0xba/0xed [ 43.358055] register_console+0x87f/0xc90 [ 43.358057] univ8250_console_init+0x3a/0x46 [ 43.358059] console_init+0x4cb/0x718 [ 43.358061] start_kernel+0x686/0x911 [ 43.358063] secondary_startup_64+0xa4/0xb0 [ 43.358064] [ 43.358065] -> #0 (console_owner){....}: [ 43.358072] console_unlock+0x411/0x1110 [ 43.358074] vprintk_emit+0x2d1/0x740 [ 43.358076] vprintk_func+0x79/0x180 [ 43.358078] printk+0xba/0xed [ 43.358080] should_fail+0x66b/0x7b0 [ 43.358082] __should_failslab+0x115/0x180 [ 43.358084] should_failslab+0x5/0x10 [ 43.358086] __kmalloc+0x6d/0x3c0 [ 43.358088] tty_buffer_alloc+0x23f/0x2a0 [ 43.358090] __tty_buffer_request_room+0x156/0x2a0 [ 43.358093] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 43.358095] pty_write+0x126/0x1f0 [ 43.358097] tty_send_xchar+0x28d/0x3b0 [ 43.358099] n_tty_ioctl_helper+0x18d/0x3a0 [ 43.358101] n_tty_ioctl+0x56/0x360 [ 43.358103] tty_ioctl+0x65d/0x1630 [ 43.358105] do_vfs_ioctl+0xcdb/0x12e0 [ 43.358107] ksys_ioctl+0x9b/0xc0 [ 43.358109] __x64_sys_ioctl+0x6f/0xb0 [ 43.358111] do_syscall_64+0xf9/0x620 [ 43.358113] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.358114] [ 43.358117] other info that might help us debug this: [ 43.358118] [ 43.358119] Chain exists of: [ 43.358125] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 43.358134] [ 43.358136] Possible unsafe locking scenario: [ 43.358138] [ 43.358140] CPU0 CPU1 [ 43.358142] ---- ---- [ 43.358143] lock(&(&port->lock)->rlock); [ 43.358148] lock(&port_lock_key); [ 43.358153] lock(&(&port->lock)->rlock); [ 43.358157] lock(console_owner); [ 43.358160] [ 43.358162] *** DEADLOCK *** [ 43.358163] [ 43.358165] 5 locks held by syz-executor150/8112: [ 43.358166] #0: 000000008844b52a (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 43.358175] #1: 00000000abf2c2ba (&tty->atomic_write_lock){+.+.}, at: tty_send_xchar+0x1d9/0x3b0 [ 43.358184] #2: 000000002998c525 (&tty->termios_rwsem){++++}, at: tty_send_xchar+0x226/0x3b0 [ 43.358192] #3: 00000000bfac6dbc (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 43.358201] #4: 00000000af18a7f7 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 43.358209] [ 43.358211] stack backtrace: [ 43.358214] CPU: 1 PID: 8112 Comm: syz-executor150 Not tainted 4.19.211-syzkaller #0 [ 43.358218] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 43.358219] Call Trace: [ 43.358221] dump_stack+0x1fc/0x2ef [ 43.358224] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 43.358226] __lock_acquire+0x30c9/0x3ff0 [ 43.358228] ? mark_held_locks+0xf0/0xf0 [ 43.358230] ? snprintf+0xf0/0xf0 [ 43.358232] ? console_unlock+0x3ec/0x1110 [ 43.358234] lock_acquire+0x170/0x3c0 [ 43.358236] ? console_unlock+0x3a9/0x1110 [ 43.358238] console_unlock+0x411/0x1110 [ 43.358240] ? console_unlock+0x3a9/0x1110 [ 43.358242] vprintk_emit+0x2d1/0x740 [ 43.358244] vprintk_func+0x79/0x180 [ 43.358246] printk+0xba/0xed [ 43.358248] ? log_store.cold+0x16/0x16 [ 43.358250] ? __lock_acquire+0x22f9/0x3ff0 [ 43.358252] ? ___ratelimit+0x319/0x590 [ 43.358254] should_fail+0x66b/0x7b0 [ 43.358256] ? setup_fault_attr+0x200/0x200 [ 43.358258] ? __lock_acquire+0x6de/0x3ff0 [ 43.358260] ? mark_held_locks+0xf0/0xf0 [ 43.358262] __should_failslab+0x115/0x180 [ 43.358264] should_failslab+0x5/0x10 [ 43.358266] __kmalloc+0x6d/0x3c0 [ 43.358268] ? tty_buffer_alloc+0x23f/0x2a0 [ 43.358270] tty_buffer_alloc+0x23f/0x2a0 [ 43.358273] __tty_buffer_request_room+0x156/0x2a0 [ 43.358275] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 43.358277] ? do_raw_spin_lock+0xcb/0x220 [ 43.358279] pty_write+0x126/0x1f0 [ 43.358281] tty_send_xchar+0x28d/0x3b0 [ 43.358283] ? tty_write_message+0x140/0x140 [ 43.358285] ? _kstrtoull+0x297/0x540 [ 43.358287] n_tty_ioctl_helper+0x18d/0x3a0 [ 43.358289] n_tty_ioctl+0x56/0x360 [ 43.358291] tty_ioctl+0x65d/0x1630 [ 43.358293] ? n_tty_poll+0x8f0/0x8f0 [ 43.358295] ? tty_fasync+0x300/0x300 [ 43.358297] ? get_pid_task+0xf4/0x190 [ 43.358299] ? proc_fail_nth_write+0x95/0x1d0 [ 43.358302] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 43.358304] ? debug_check_no_obj_freed+0x201/0x490 [ 43.358306] ? __vfs_write+0xff/0x770 [ 43.358308] ? proc_tgid_io_accounting+0x7f0/0x7f0 [ 43.358310] ? common_file_perm+0x4e5/0x850 [ 43.358312] ? tty_fasync+0x300/0x300 [ 43.358314] do_vfs_ioctl+0xcdb/0x12e0 [ 43.358316] ? vfs_write+0x3d7/0x540 [ 43.358318] ? ioctl_preallocate+0x200/0x200 [ 43.358321] ? lock_downgrade+0x720/0x720 [ 43.358323] ? check_preemption_disabled+0x41/0x280 [ 43.358325] ? vfs_write+0x393/0x540 [ 43.358327] ? ksys_write+0x1c8/0x2a0 [ 43.358329] ksys_ioctl+0x9b/0xc0 [ 43.358331] __x64_sys_ioctl+0x6f/0xb0 [ 43.358333] ? lockdep_hardirqs_on+0x3a8/0x5c0 [ 43.358335] do_syscall_64+0xf9/0x620 [ 43.358337] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 43.358339] RIP: 0033:0x7ffa28e5f679 [ 43.358346] 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