Warning: Permanently added '10.128.15.192' (ECDSA) to the list of known hosts. executing program syzkaller login: [ 34.226691] FAULT_INJECTION: forcing a failure. [ 34.226691] name failslab, interval 1, probability 0, space 0, times 1 [ 34.239494] CPU: 0 PID: 8095 Comm: syz-executor295 Not tainted 4.19.211-syzkaller #0 [ 34.247584] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 34.257233] Call Trace: [ 34.259915] dump_stack+0x1fc/0x2ef [ 34.263539] should_fail.cold+0xa/0xf [ 34.267321] ? setup_fault_attr+0x200/0x200 [ 34.271621] ? mark_held_locks+0xf0/0xf0 [ 34.275660] ? lock_acquire+0x170/0x3c0 [ 34.279889] __should_failslab+0x115/0x180 [ 34.284208] should_failslab+0x5/0x10 [ 34.288957] __kmalloc+0x6d/0x3c0 [ 34.292484] ? tty_buffer_alloc+0x23f/0x2a0 [ 34.296905] ? __mutex_lock+0x368/0x1190 [ 34.301230] tty_buffer_alloc+0x23f/0x2a0 [ 34.306172] __tty_buffer_request_room+0x156/0x2a0 [ 34.311095] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 34.316614] ? do_raw_spin_lock+0xcb/0x220 [ 34.320897] pty_write+0x126/0x1f0 [ 34.324456] n_tty_write+0xa03/0xff0 [ 34.328171] ? __ldsem_down_read_nested+0xd2/0x780 [ 34.333095] ? n_tty_open+0x160/0x160 [ 34.337070] ? do_wait_intr_irq+0x270/0x270 [ 34.341858] ? __might_fault+0x192/0x1d0 [ 34.345931] tty_write+0x496/0x810 [ 34.349594] ? n_tty_open+0x160/0x160 [ 34.353463] __vfs_write+0xf7/0x770 [ 34.357578] ? tty_compat_ioctl+0x270/0x270 [ 34.361896] ? common_file_perm+0x4e5/0x850 [ 34.366198] ? kernel_read+0x110/0x110 [ 34.370087] ? trace_hardirqs_off+0x64/0x200 [ 34.374503] ? apparmor_getprocattr+0x11e0/0x11e0 [ 34.379456] ? vfs_write+0x3d7/0x540 [ 34.383250] ? security_file_permission+0x1c0/0x220 [ 34.388261] vfs_write+0x1f3/0x540 [ 34.391785] ksys_write+0x12b/0x2a0 [ 34.395398] ? __ia32_sys_read+0xb0/0xb0 [ 34.399534] ? trace_hardirqs_off_caller+0x6e/0x210 [ 34.404541] ? do_syscall_64+0x21/0x620 [ 34.408508] do_syscall_64+0xf9/0x620 [ 34.412639] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.417807] RIP: 0033:0x7f06c33c3679 [ 34.421500] 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 [ 34.440495] RSP: 002b:00007fff09c2cc98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 34.448378] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f06c33c3679 [ 34.455643] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 34.463014] RBP: 00007fff09c2cca0 R08: 0000000000000001 R09: 00007f06c3380033 [ 34.470426] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 34.477689] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 34.485080] [ 34.485083] ====================================================== [ 34.485086] WARNING: possible circular locking dependency detected [ 34.485088] 4.19.211-syzkaller #0 Not tainted [ 34.485091] ------------------------------------------------------ [ 34.485093] syz-executor295/8095 is trying to acquire lock: [ 34.485095] 0000000020f1aa89 (console_owner){....}, at: console_unlock+0x3a9/0x1110 [ 34.485103] [ 34.485105] but task is already holding lock: [ 34.485106] 0000000031702248 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 34.485114] [ 34.485116] which lock already depends on the new lock. [ 34.485117] [ 34.485118] [ 34.485121] the existing dependency chain (in reverse order) is: [ 34.485122] [ 34.485123] -> #2 (&(&port->lock)->rlock){-.-.}: [ 34.485131] tty_port_tty_get+0x1d/0x80 [ 34.485133] tty_port_default_wakeup+0x11/0x40 [ 34.485135] serial8250_tx_chars+0x490/0xaf0 [ 34.485137] serial8250_handle_irq.part.0+0x31f/0x3d0 [ 34.485140] serial8250_default_handle_irq+0xae/0x220 [ 34.485142] serial8250_interrupt+0x101/0x240 [ 34.485144] __handle_irq_event_percpu+0x27e/0x8e0 [ 34.485146] handle_irq_event+0x102/0x290 [ 34.485149] handle_edge_irq+0x260/0xcf0 [ 34.485150] handle_irq+0x35/0x50 [ 34.485152] do_IRQ+0x93/0x1c0 [ 34.485154] ret_from_intr+0x0/0x1e [ 34.485157] _raw_spin_unlock_irqrestore+0xa3/0xe0 [ 34.485158] uart_write+0x3bb/0x6f0 [ 34.485160] do_output_char+0x5de/0x850 [ 34.485163] n_tty_write+0x46e/0xff0 [ 34.485164] tty_write+0x496/0x810 [ 34.485167] redirected_tty_write+0xaa/0xb0 [ 34.485169] do_iter_write+0x461/0x5d0 [ 34.485171] vfs_writev+0x153/0x2e0 [ 34.485172] do_writev+0x136/0x330 [ 34.485174] do_syscall_64+0xf9/0x620 [ 34.485177] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.485178] [ 34.485179] -> #1 (&port_lock_key){-.-.}: [ 34.485186] serial8250_console_write+0x90e/0xb70 [ 34.485188] console_unlock+0xbb6/0x1110 [ 34.485190] vprintk_emit+0x2d1/0x740 [ 34.485192] vprintk_func+0x79/0x180 [ 34.485194] printk+0xba/0xed [ 34.485196] register_console+0x87f/0xc90 [ 34.485198] univ8250_console_init+0x3a/0x46 [ 34.485200] console_init+0x4cb/0x718 [ 34.485202] start_kernel+0x686/0x911 [ 34.485204] secondary_startup_64+0xa4/0xb0 [ 34.485205] [ 34.485207] -> #0 (console_owner){....}: [ 34.485214] console_unlock+0x411/0x1110 [ 34.485216] vprintk_emit+0x2d1/0x740 [ 34.485218] vprintk_func+0x79/0x180 [ 34.485219] printk+0xba/0xed [ 34.485221] should_fail+0x66b/0x7b0 [ 34.485223] __should_failslab+0x115/0x180 [ 34.485226] should_failslab+0x5/0x10 [ 34.485227] __kmalloc+0x6d/0x3c0 [ 34.485229] tty_buffer_alloc+0x23f/0x2a0 [ 34.485232] __tty_buffer_request_room+0x156/0x2a0 [ 34.485234] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 34.485236] pty_write+0x126/0x1f0 [ 34.485238] n_tty_write+0xa03/0xff0 [ 34.485240] tty_write+0x496/0x810 [ 34.485242] __vfs_write+0xf7/0x770 [ 34.485244] vfs_write+0x1f3/0x540 [ 34.485246] ksys_write+0x12b/0x2a0 [ 34.485248] do_syscall_64+0xf9/0x620 [ 34.485251] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.485252] [ 34.485254] other info that might help us debug this: [ 34.485255] [ 34.485257] Chain exists of: [ 34.485258] console_owner --> &port_lock_key --> &(&port->lock)->rlock [ 34.485267] [ 34.485269] Possible unsafe locking scenario: [ 34.485270] [ 34.485272] CPU0 CPU1 [ 34.485274] ---- ---- [ 34.485275] lock(&(&port->lock)->rlock); [ 34.485280] lock(&port_lock_key); [ 34.485285] lock(&(&port->lock)->rlock); [ 34.485289] lock(console_owner); [ 34.485293] [ 34.485295] *** DEADLOCK *** [ 34.485296] [ 34.485298] 6 locks held by syz-executor295/8095: [ 34.485299] #0: 00000000db00da59 (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 [ 34.485308] #1: 00000000061c92d6 (&tty->atomic_write_lock){+.+.}, at: tty_write+0x24e/0x810 [ 34.485316] #2: 0000000057fd0778 (&tty->termios_rwsem){++++}, at: n_tty_write+0x1b5/0xff0 [ 34.485325] #3: 000000004c284fd1 (&ldata->output_lock){+.+.}, at: n_tty_write+0x9d0/0xff0 [ 34.485333] #4: 0000000031702248 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xf4/0x1f0 [ 34.485341] #5: 0000000059dbbca6 (console_lock){+.+.}, at: vprintk_func+0x79/0x180 [ 34.485350] [ 34.485351] stack backtrace: [ 34.485355] CPU: 0 PID: 8095 Comm: syz-executor295 Not tainted 4.19.211-syzkaller #0 [ 34.485358] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 [ 34.485360] Call Trace: [ 34.485362] dump_stack+0x1fc/0x2ef [ 34.485365] print_circular_bug.constprop.0.cold+0x2d7/0x41e [ 34.485367] __lock_acquire+0x30c9/0x3ff0 [ 34.485369] ? mark_held_locks+0xf0/0xf0 [ 34.485371] ? snprintf+0xf0/0xf0 [ 34.485373] ? console_unlock+0x3ec/0x1110 [ 34.485375] lock_acquire+0x170/0x3c0 [ 34.485377] ? console_unlock+0x3a9/0x1110 [ 34.485379] console_unlock+0x411/0x1110 [ 34.485381] ? console_unlock+0x3a9/0x1110 [ 34.485383] vprintk_emit+0x2d1/0x740 [ 34.485385] vprintk_func+0x79/0x180 [ 34.485387] printk+0xba/0xed [ 34.485389] ? log_store.cold+0x16/0x16 [ 34.485391] ? try_to_wake_up+0x733/0x1050 [ 34.485393] ? __lock_acquire+0x6de/0x3ff0 [ 34.485395] ? ___ratelimit+0x319/0x590 [ 34.485397] should_fail+0x66b/0x7b0 [ 34.485399] ? setup_fault_attr+0x200/0x200 [ 34.485402] ? mark_held_locks+0xf0/0xf0 [ 34.485404] ? lock_acquire+0x170/0x3c0 [ 34.485406] __should_failslab+0x115/0x180 [ 34.485408] should_failslab+0x5/0x10 [ 34.485409] __kmalloc+0x6d/0x3c0 [ 34.485412] ? tty_buffer_alloc+0x23f/0x2a0 [ 34.485414] ? __mutex_lock+0x368/0x1190 [ 34.485416] tty_buffer_alloc+0x23f/0x2a0 [ 34.485418] __tty_buffer_request_room+0x156/0x2a0 [ 34.485421] tty_insert_flip_string_fixed_flag+0x93/0x250 [ 34.485423] ? do_raw_spin_lock+0xcb/0x220 [ 34.485425] pty_write+0x126/0x1f0 [ 34.485426] n_tty_write+0xa03/0xff0 [ 34.485429] ? __ldsem_down_read_nested+0xd2/0x780 [ 34.485431] ? n_tty_open+0x160/0x160 [ 34.485433] ? do_wait_intr_irq+0x270/0x270 [ 34.485435] ? __might_fault+0x192/0x1d0 [ 34.485437] tty_write+0x496/0x810 [ 34.485439] ? n_tty_open+0x160/0x160 [ 34.485441] __vfs_write+0xf7/0x770 [ 34.485443] ? tty_compat_ioctl+0x270/0x270 [ 34.485445] ? common_file_perm+0x4e5/0x850 [ 34.485447] ? kernel_read+0x110/0x110 [ 34.485449] ? trace_hardirqs_off+0x64/0x200 [ 34.485451] ? apparmor_getprocattr+0x11e0/0x11e0 [ 34.485453] ? vfs_write+0x3d7/0x540 [ 34.485456] ? security_file_permission+0x1c0/0x220 [ 34.485458] vfs_write+0x1f3/0x540 [ 34.485460] ksys_write+0x12b/0x2a0 [ 34.485462] ? __ia32_sys_read+0xb0/0xb0 [ 34.485464] ? trace_hardirqs_off_caller+0x6e/0x210 [ 34.485466] ? do_syscall_64+0x21/0x620 [ 34.485468] do_syscall_64+0xf9/0x620 [ 34.485470] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 34.485472] RIP: 0033:0x7f06c33c3679 [ 34.485479] 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 [ 34.485482] RSP: 002b:00007fff09c2cc98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 34.485487] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f06c33c3679 [ 34.485490] RDX: 000000000000ff2e RSI: 0000000020000080 RDI: 0000000000000003 [ 34.485493] RBP: 00007fff09c2cca0 R08: 0000000000000001 R09: 00007f06c3380033 [ 34.485496] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000004 [ 34.485499] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000