overlayfs: unrecognized mount option "lowerdir" or missing value overlayfs: failed to resolve './file0': -2 ttyprintk ttyprintk: tty_port_close_start: tty->count = 1 port count = 3 ====================================================== WARNING: possible circular locking dependency detected 4.14.232-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/24286 is trying to acquire lock: (console_owner){-...}, at: [] console_trylock_spinning kernel/printk/printk.c:1658 [inline] (console_owner){-...}, at: [] vprintk_emit+0x32a/0x620 kernel/printk/printk.c:1922 but task is already holding lock: (&(&port->lock)->rlock){-.-.}, at: [] tty_port_close_start.part.0+0x28/0x4c0 drivers/tty/tty_port.c:573 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+0x8c/0xc0 kernel/locking/spinlock.c:160 tty_port_tty_get+0x1d/0x80 drivers/tty/tty_port.c:288 tty_port_default_wakeup+0x11/0x40 drivers/tty/tty_port.c:46 serial8250_tx_chars+0x3fe/0xbf0 drivers/tty/serial/8250/8250_port.c:1810 serial8250_handle_irq.part.0+0x28d/0x330 drivers/tty/serial/8250/8250_port.c:1897 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1870 [inline] serial8250_default_handle_irq+0x8a/0x1f0 drivers/tty/serial/8250/8250_port.c:1913 serial8250_interrupt+0xf3/0x210 drivers/tty/serial/8250/8250_core.c:129 __handle_irq_event_percpu+0xee/0x7f0 kernel/irq/handle.c:147 handle_irq_event_percpu kernel/irq/handle.c:187 [inline] handle_irq_event+0xf0/0x250 kernel/irq/handle.c:204 handle_edge_irq+0x224/0xc40 kernel/irq/chip.c:770 generic_handle_irq_desc include/linux/irqdesc.h:159 [inline] handle_irq+0x35/0x50 arch/x86/kernel/irq_64.c:87 do_IRQ+0x93/0x1d0 arch/x86/kernel/irq.c:230 ret_from_intr+0x0/0x1e arch_local_irq_restore arch/x86/include/asm/paravirt.h:779 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0xa3/0xe0 kernel/locking/spinlock.c:192 spin_unlock_irqrestore include/linux/spinlock.h:372 [inline] uart_write+0x2dd/0x560 drivers/tty/serial/serial_core.c:625 do_output_char+0x4f5/0x750 drivers/tty/n_tty.c:447 process_output drivers/tty/n_tty.c:514 [inline] n_tty_write+0x3e3/0xda0 drivers/tty/n_tty.c:2345 do_tty_write drivers/tty/tty_io.c:959 [inline] tty_write+0x410/0x740 drivers/tty/tty_io.c:1043 redirected_tty_write+0x9c/0xb0 drivers/tty/tty_io.c:1064 do_loop_readv_writev fs/read_write.c:698 [inline] do_loop_readv_writev fs/read_write.c:682 [inline] do_iter_write+0x3da/0x550 fs/read_write.c:956 vfs_writev+0x125/0x290 fs/read_write.c:999 do_writev+0xfc/0x2c0 fs/read_write.c:1034 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb -> #1 (&port_lock_key){-.-.}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:160 serial8250_console_write+0x7a7/0x9d0 drivers/tty/serial/8250/8250_port.c:3253 call_console_drivers kernel/printk/printk.c:1725 [inline] console_unlock+0x99d/0xf20 kernel/printk/printk.c:2400 vprintk_emit+0x224/0x620 kernel/printk/printk.c:1923 vprintk_func+0x58/0x160 kernel/printk/printk_safe.c:409 printk+0x9e/0xbc kernel/printk/printk.c:1996 register_console+0x6f4/0xad0 kernel/printk/printk.c:2719 univ8250_console_init+0x2f/0x3a drivers/tty/serial/8250/8250_core.c:691 console_init+0x46/0x53 kernel/printk/printk.c:2800 start_kernel+0x52e/0x770 init/main.c:634 secondary_startup_64+0xa5/0xb0 arch/x86/kernel/head_64.S:240 -> #0 (console_owner){-...}: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 console_trylock_spinning kernel/printk/printk.c:1679 [inline] vprintk_emit+0x367/0x620 kernel/printk/printk.c:1922 vprintk_func+0x58/0x160 kernel/printk/printk_safe.c:409 printk+0x9e/0xbc kernel/printk/printk.c:1996 tty_port_close_start.part.0+0x46c/0x4c0 drivers/tty/tty_port.c:575 tty_port_close_start drivers/tty/tty_port.c:647 [inline] tty_port_close+0x3b/0x130 drivers/tty/tty_port.c:640 tty_release+0x40b/0x10d0 drivers/tty/tty_io.c:1670 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb 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 *** 2 locks held by syz-executor.5/24286: #0: (&tty->legacy_mutex){+.+.}, at: [] tty_lock+0x5f/0x70 drivers/tty/tty_mutex.c:19 #1: (&(&port->lock)->rlock){-.-.}, at: [] tty_port_close_start.part.0+0x28/0x4c0 drivers/tty/tty_port.c:573 stack backtrace: CPU: 0 PID: 24286 Comm: syz-executor.5 Not tainted 4.14.232-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258 check_prev_add kernel/locking/lockdep.c:1905 [inline] check_prevs_add kernel/locking/lockdep.c:2022 [inline] validate_chain kernel/locking/lockdep.c:2464 [inline] __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 console_trylock_spinning kernel/printk/printk.c:1679 [inline] vprintk_emit+0x367/0x620 kernel/printk/printk.c:1922 vprintk_func+0x58/0x160 kernel/printk/printk_safe.c:409 printk+0x9e/0xbc kernel/printk/printk.c:1996 tty_port_close_start.part.0+0x46c/0x4c0 drivers/tty/tty_port.c:575 tty_port_close_start drivers/tty/tty_port.c:647 [inline] tty_port_close+0x3b/0x130 drivers/tty/tty_port.c:640 tty_release+0x40b/0x10d0 drivers/tty/tty_io.c:1670 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x41940b RSP: 002b:00007fff9cb57fb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 000000000041940b RDX: 0000000000570738 RSI: 0000001b2dd242c8 RDI: 0000000000000005 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000001365 R10: 00000000611e1368 R11: 0000000000000293 R12: 00000000000a9aed R13: 00000000000003e8 R14: 000000000056bf60 R15: 00000000000a9ad0 overlayfs: failed to resolve './file1': -2 overlayfs: unrecognized mount option "lowerdir" or missing value audit: type=1326 audit(1619630348.744:496): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24304 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: failed to resolve './file1': -2 overlayfs: failed to resolve 'f': -2 overlayfs: failed to resolve './file1': -2 overlayfs: failed to resolve './file1': -2 overlayfs: failed to resolve 'f': -2 overlayfs: failed to resolve './file0': -2 overlayfs: failed to resolve './file0': -2 audit: type=1326 audit(1619630349.544:497): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24304 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 audit: type=1326 audit(1619630349.594:498): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24353 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: failed to resolve './file0': -2 overlayfs: failed to resolve 'f': -2 overlayfs: failed to resolve './file0': -2 overlayfs: failed to resolve 'fil': -2 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. overlayfs: failed to resolve './file0': -2 netlink: 24 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1326 audit(1619630350.424:499): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24353 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: failed to resolve './file0': -2 overlayfs: failed to resolve 'fil': -2 overlayfs: failed to resolve './file1': -2 audit: type=1326 audit(1619630350.574:500): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24419 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: failed to resolve 'fil': -2 overlayfs: failed to resolve './file1': -2 overlayfs: failed to resolve 'file': -2 print_req_error: I/O error, dev loop5, sector 0 audit: type=1326 audit(1619630351.414:501): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24419 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: failed to resolve './file1': -2 overlayfs: failed to resolve 'file': -2 audit: type=1326 audit(1619630351.534:502): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24482 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'file': -2 overlayfs: missing 'lowerdir' audit: type=1326 audit(1619630352.334:503): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24482 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: fs on './file0' does not support file handles, falling back to index=off. audit: type=1326 audit(1619630352.494:504): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24528 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' (syz-executor.5,24550,1):ocfs2_parse_options:1484 ERROR: Unrecognized mount option "†#" or missing value overlayfs: fs on './file0' does not support file handles, falling back to index=off. (syz-executor.5,24550,1):ocfs2_fill_super:1217 ERROR: status = -22 print_req_error: I/O error, dev loop5, sector 0 audit: type=1326 audit(1619630353.304:505): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24528 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' kauditd_printk_skb: 5 callbacks suppressed audit: type=1326 audit(1619630354.304:511): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24574 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. overlayfs: missing 'lowerdir' audit: type=1326 audit(1619630354.534:512): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24637 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: unrecognized mount option "lowerdir" or missing value netlink: 24 bytes leftover after parsing attributes in process `syz-executor.5'. audit: type=1326 audit(1619630354.684:513): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24637 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: unrecognized mount option "lowerdir" or missing value overlayfs: missing 'lowerdir' audit: type=1326 audit(1619630354.804:514): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24684 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: unrecognized mount option "lowerdir" or missing value audit: type=1326 audit(1619630355.604:515): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24684 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 audit: type=1326 audit(1619630355.734:516): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24727 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'f': -2 overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'f': -2 overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'f': -2 overlayfs: missing 'lowerdir' audit: type=1326 audit(1619630356.564:517): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24727 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' audit: type=1326 audit(1619630356.714:518): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24776 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'fil': -2 overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' overlayfs: missing 'lowerdir' audit: type=1326 audit(1619630357.534:519): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24776 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'fil': -2 audit: type=1326 audit(1619630357.704:520): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=24820 comm="syz-executor.5" exe="/root/syz-executor.5" sig=31 arch=c000003e syscall=202 compat=0 ip=0x4665f9 code=0x0 overlayfs: missing 'lowerdir' overlayfs: fs on './file0' does not support file handles, falling back to index=off. overlayfs: unrecognized mount option "lowerdir" or missing value overlayfs: missing 'lowerdir' overlayfs: failed to resolve 'fil': -2 overlayfs: missing 'lowerdir' overlayfs: fs on './file0' does not support file handles, falling back to index=off.