__should_failslab+0x121/0x190 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1603 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3367 [inline] __do_kmalloc mm/slab.c:3709 [inline] __kmalloc+0x71/0x740 mm/slab.c:3720 overlayfs: './file0' not a directory IRQs not enabled as expected WARNING: CPU: 1 PID: 3866 at fs/eventpoll.c:1756 ep_poll+0x31e/0xe50 fs/eventpoll.c:1756 kmalloc include/linux/slab.h:550 [inline] tty_buffer_alloc drivers/tty/tty_buffer.c:175 [inline] __tty_buffer_request_room+0x1fb/0x5c0 drivers/tty/tty_buffer.c:273 Kernel panic - not syncing: panic_on_warn set ... tty_insert_flip_string_fixed_flag+0x93/0x1f0 drivers/tty/tty_buffer.c:318 tty_insert_flip_string include/linux/tty_flip.h:37 [inline] pty_write+0x133/0x200 drivers/tty/pty.c:122 process_output_block drivers/tty/n_tty.c:593 [inline] n_tty_write+0x3ff/0x1150 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:959 [inline] tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1043 __vfs_write+0x116/0x8e0 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457e39 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fbe57b47c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fbe57b47c90 RCX: 0000000000457e39 RDX: 0000000000001006 RSI: 0000000020001640 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbe57b486d4 R13: 00000000004c70c7 R14: 00000000004dca70 R15: 0000000000000007 CPU: 1 PID: 3866 Comm: udevd Not tainted 5.0.0-rc5 #60 ====================================================== WARNING: possible circular locking dependency detected 5.0.0-rc5 #60 Not tainted ------------------------------------------------------ syz-executor5/16894 is trying to acquire lock: 00000000fd9d9408 (console_owner){-.-.}, at: log_next kernel/printk/printk.c:492 [inline] 00000000fd9d9408 (console_owner){-.-.}, at: console_unlock+0x440/0x10a0 kernel/printk/printk.c:2395 but task is already holding lock: 00000000953097c3 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xff/0x200 drivers/tty/pty.c:120 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&(&port->lock)->rlock){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 tty_port_tty_get+0x22/0x80 drivers/tty/tty_port.c:287 tty_port_default_wakeup+0x16/0x40 drivers/tty/tty_port.c:47 tty_port_tty_wakeup+0x5d/0x70 drivers/tty/tty_port.c:387 uart_write_wakeup+0x46/0x70 drivers/tty/serial/serial_core.c:103 serial8250_tx_chars+0x4a4/0xb20 drivers/tty/serial/8250/8250_port.c:1806 serial8250_handle_irq.part.0+0x1be/0x2e0 drivers/tty/serial/8250/8250_port.c:1879 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1865 [inline] serial8250_default_handle_irq+0xc5/0x150 drivers/tty/serial/8250/8250_port.c:1895 serial8250_interrupt+0xfb/0x1a0 drivers/tty/serial/8250/8250_core.c:125 __handle_irq_event_percpu+0x146/0x900 kernel/irq/handle.c:149 handle_irq_event_percpu+0x74/0x160 kernel/irq/handle.c:189 handle_irq_event+0xa7/0x134 kernel/irq/handle.c:206 handle_edge_irq+0x232/0x8a0 kernel/irq/chip.c:791 generic_handle_irq_desc include/linux/irqdesc.h:154 [inline] handle_irq+0x252/0x3d8 arch/x86/kernel/irq_64.c:78 do_IRQ+0x99/0x1d0 arch/x86/kernel/irq.c:246 ret_from_intr+0x0/0x1e native_safe_halt+0x2/0x10 arch/x86/include/asm/irqflags.h:57 arch_cpu_idle+0x10/0x20 arch/x86/kernel/process.c:555 default_idle_call+0x36/0x90 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x386/0x570 kernel/sched/idle.c:262 cpu_startup_entry+0x1b/0x20 kernel/sched/idle.c:353 start_secondary+0x404/0x5c0 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #1 (&port_lock_key){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x95/0xcd kernel/locking/spinlock.c:152 serial8250_console_write+0x253/0x9c0 drivers/tty/serial/8250/8250_port.c:3245 univ8250_console_write+0x5f/0x70 drivers/tty/serial/8250/8250_core.c:586 call_console_drivers kernel/printk/printk.c:1737 [inline] console_unlock+0xbc6/0x10a0 kernel/printk/printk.c:2408 vprintk_emit+0x280/0x6d0 kernel/printk/printk.c:1931 vprintk_default+0x28/0x30 kernel/printk/printk.c:1958 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:1991 register_console+0x74d/0xb50 kernel/printk/printk.c:2723 univ8250_console_init+0x3e/0x4b drivers/tty/serial/8250/8250_core.c:681 console_init+0x4f7/0x761 kernel/printk/printk.c:2809 start_kernel+0x568/0x841 init/main.c:667 x86_64_start_reservations+0x29/0x2b arch/x86/kernel/head64.c:470 x86_64_start_kernel+0x77/0x7b arch/x86/kernel/head64.c:451 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 -> #0 (console_owner){-.-.}: lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3841 console_lock_spinning_enable kernel/printk/printk.c:1600 [inline] console_unlock+0x4aa/0x10a0 kernel/printk/printk.c:2405 vprintk_emit+0x280/0x6d0 kernel/printk/printk.c:1931 vprintk_default+0x28/0x30 kernel/printk/printk.c:1958 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:1991 fail_dump lib/fault-inject.c:44 [inline] should_fail+0x6f1/0x85c lib/fault-inject.c:149 __should_failslab+0x121/0x190 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1603 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3367 [inline] __do_kmalloc mm/slab.c:3709 [inline] __kmalloc+0x71/0x740 mm/slab.c:3720 kmalloc include/linux/slab.h:550 [inline] tty_buffer_alloc drivers/tty/tty_buffer.c:175 [inline] __tty_buffer_request_room+0x1fb/0x5c0 drivers/tty/tty_buffer.c:273 tty_insert_flip_string_fixed_flag+0x93/0x1f0 drivers/tty/tty_buffer.c:318 tty_insert_flip_string include/linux/tty_flip.h:37 [inline] pty_write+0x133/0x200 drivers/tty/pty.c:122 process_output_block drivers/tty/n_tty.c:593 [inline] n_tty_write+0x3ff/0x1150 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:959 [inline] tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1043 __vfs_write+0x116/0x8e0 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Chain exists of: console_owner --> &port_lock_key --> &(&port->lock)->rlock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&port->lock)->rlock); lock(&port_lock_key); lock(&(&port->lock)->rlock); lock(console_owner); *** DEADLOCK *** 6 locks held by syz-executor5/16894: #0: 00000000b15f99d7 (&tty->ldisc_sem){++++}, at: ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:341 #1: 000000009d327214 (&tty->atomic_write_lock){+.+.}, at: tty_write_lock+0x23/0x90 drivers/tty/tty_io.c:885 #2: 0000000002494e11 (&o_tty->termios_rwsem/1){++++}, at: n_tty_write+0x1ab/0x1150 drivers/tty/n_tty.c:2314 #3: 00000000390c153e (&ldata->output_lock){+.+.}, at: process_output_block drivers/tty/n_tty.c:548 [inline] #3: 00000000390c153e (&ldata->output_lock){+.+.}, at: n_tty_write+0x531/0x1150 drivers/tty/n_tty.c:2331 #4: 00000000953097c3 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xff/0x200 drivers/tty/pty.c:120 #5: 00000000a8f22e2f (console_lock){+.+.}, at: console_trylock_spinning kernel/printk/printk.c:1662 [inline] #5: 00000000a8f22e2f (console_lock){+.+.}, at: vprintk_emit+0x267/0x6d0 kernel/printk/printk.c:1930 stack backtrace: CPU: 0 PID: 16894 Comm: syz-executor5 Not tainted 5.0.0-rc5 #60 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1224 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2350 [inline] __lock_acquire+0x2f00/0x4700 kernel/locking/lockdep.c:3338 lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:3841 console_lock_spinning_enable kernel/printk/printk.c:1600 [inline] console_unlock+0x4aa/0x10a0 kernel/printk/printk.c:2405 vprintk_emit+0x280/0x6d0 kernel/printk/printk.c:1931 vprintk_default+0x28/0x30 kernel/printk/printk.c:1958 vprintk_func+0x7e/0x189 kernel/printk/printk_safe.c:398 printk+0xba/0xed kernel/printk/printk.c:1991 fail_dump lib/fault-inject.c:44 [inline] should_fail+0x6f1/0x85c lib/fault-inject.c:149 __should_failslab+0x121/0x190 mm/failslab.c:32 should_failslab+0x9/0x14 mm/slab_common.c:1603 slab_pre_alloc_hook mm/slab.h:423 [inline] slab_alloc mm/slab.c:3367 [inline] __do_kmalloc mm/slab.c:3709 [inline] __kmalloc+0x71/0x740 mm/slab.c:3720 kmalloc include/linux/slab.h:550 [inline] tty_buffer_alloc drivers/tty/tty_buffer.c:175 [inline] __tty_buffer_request_room+0x1fb/0x5c0 drivers/tty/tty_buffer.c:273 tty_insert_flip_string_fixed_flag+0x93/0x1f0 drivers/tty/tty_buffer.c:318 tty_insert_flip_string include/linux/tty_flip.h:37 [inline] pty_write+0x133/0x200 drivers/tty/pty.c:122 process_output_block drivers/tty/n_tty.c:593 [inline] n_tty_write+0x3ff/0x1150 drivers/tty/n_tty.c:2331 do_tty_write drivers/tty/tty_io.c:959 [inline] tty_write+0x45b/0x7a0 drivers/tty/tty_io.c:1043 __vfs_write+0x116/0x8e0 fs/read_write.c:485 vfs_write+0x20c/0x580 fs/read_write.c:549 ksys_write+0xea/0x1f0 fs/read_write.c:598 __do_sys_write fs/read_write.c:610 [inline] __se_sys_write fs/read_write.c:607 [inline] __x64_sys_write+0x73/0xb0 fs/read_write.c:607 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457e39 Code: ad b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b8 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fbe57b47c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fbe57b47c90 RCX: 0000000000457e39 RDX: 0000000000001006 RSI: 0000000020001640 RDI: 0000000000000003 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fbe57b486d4 R13: 00000000004c70c7 R14: 00000000004dca70 R15: 0000000000000007 overlayfs: failed to resolve './file1': -2 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x172/0x1f0 lib/dump_stack.c:113 panic+0x2cb/0x65c kernel/panic.c:214 __warn.cold+0x20/0x45 kernel/panic.c:571 report_bug+0x263/0x2b0 lib/bug.c:186 fixup_bug arch/x86/kernel/traps.c:178 [inline] fixup_bug arch/x86/kernel/traps.c:173 [inline] do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:271 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:290 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:973 RIP: 0010:ep_poll+0x31e/0xe50 fs/eventpoll.c:1756 Code: ff 44 89 ee e8 83 77 ad ff 45 84 ed 0f 85 39 fe ff ff e8 35 76 ad ff 48 c7 c7 a0 3d 76 87 c6 05 99 70 96 07 01 e8 70 c7 80 ff <0f> 0b e9 1a fe ff ff e8 16 76 ad ff 4c 89 f0 48 ba cf f7 53 e3 a5 RSP: 0018:ffff88809540fce0 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff888095b8bcc0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff815a8c66 RDI: ffffed1012a81f8e RBP: ffff88809540fe98 R08: ffff888095404280 R09: ffffed1015d25021 R10: ffffed1015d25020 R11: ffff8880ae928107 R12: 1ffff11012a81fa6 R13: 0000000000000000 R14: 0000000000000bb8 R15: 00000000ffffffea do_epoll_wait+0x1b3/0x200 fs/eventpoll.c:2216 __do_sys_epoll_wait fs/eventpoll.c:2226 [inline] __se_sys_epoll_wait fs/eventpoll.c:2223 [inline] __x64_sys_epoll_wait+0x97/0xf0 fs/eventpoll.c:2223 do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fb9e35e2943 Code: 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 90 90 90 90 90 90 83 3d b5 dc 2a 00 00 75 13 49 89 ca b8 e8 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 34 c3 48 83 ec 08 e8 3b c4 00 00 48 89 04 24 RSP: 002b:00007ffd80407278 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8 RAX: ffffffffffffffda RBX: 0000000000000bb8 RCX: 00007fb9e35e2943 RDX: 0000000000000008 RSI: 00007ffd80407370 RDI: 000000000000000a RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000bb8 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000000 R14: 00000000013c8d40 R15: 00000000013c8030 Kernel Offset: disabled Rebooting in 86400 seconds..