FAT-fs (loop4): Unrecognized mount option "./file1" or missing value ====================================================== WARNING: possible circular locking dependency detected 5.10.109 #1 Not tainted ------------------------------------------------------ syz-executor.0/11463 is trying to acquire lock: ffff88804897a578 (&tty->read_wait){....}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88804897a578 (&tty->read_wait){....}-{2:2}, at: io_poll_double_wake+0x1f8/0x550 fs/io_uring.c:5090 but task is already holding lock: ffff88804897a528 (&tty->write_wait){-.-.}-{2:2}, at: __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #5 (&tty->write_wait){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 tty_port_default_wakeup+0x26/0x40 drivers/tty/tty_port.c:50 serial8250_tx_chars+0x516/0xb40 drivers/tty/serial/8250/8250_port.c:1851 serial8250_handle_irq.part.0+0x3f1/0x4c0 drivers/tty/serial/8250/8250_port.c:1938 serial8250_handle_irq drivers/tty/serial/8250/8250_port.c:1911 [inline] serial8250_default_handle_irq+0xb8/0x230 drivers/tty/serial/8250/8250_port.c:1954 serial8250_interrupt+0xf4/0x1a0 drivers/tty/serial/8250/8250_core.c:126 __handle_irq_event_percpu+0x2ef/0x820 kernel/irq/handle.c:156 handle_irq_event_percpu kernel/irq/handle.c:196 [inline] handle_irq_event+0x102/0x290 kernel/irq/handle.c:213 handle_edge_irq+0x249/0xd00 kernel/irq/chip.c:822 asm_call_irq_on_stack+0x12/0x20 __run_irq_on_irqstack arch/x86/include/asm/irq_stack.h:48 [inline] run_irq_on_irqstack_cond arch/x86/include/asm/irq_stack.h:101 [inline] handle_irq arch/x86/kernel/irq.c:230 [inline] __common_interrupt arch/x86/kernel/irq.c:249 [inline] common_interrupt+0xdd/0x190 arch/x86/kernel/irq.c:239 asm_common_interrupt+0x1e/0x40 arch/x86/include/asm/idtentry.h:626 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0x25/0x40 kernel/locking/spinlock.c:191 spin_unlock_irqrestore include/linux/spinlock.h:409 [inline] uart_write+0x304/0x580 drivers/tty/serial/serial_core.c:622 do_output_char+0x5e4/0x860 drivers/tty/n_tty.c:442 process_output drivers/tty/n_tty.c:509 [inline] n_tty_write+0x487/0xf90 drivers/tty/n_tty.c:2359 do_tty_write drivers/tty/tty_io.c:1028 [inline] file_tty_write.constprop.0+0x4f8/0x8d0 drivers/tty/tty_io.c:1118 redirected_tty_write+0xa1/0xc0 drivers/tty/tty_io.c:1125 call_write_iter include/linux/fs.h:1903 [inline] do_iter_readv_writev+0x476/0x750 fs/read_write.c:740 do_iter_write+0x18d/0x670 fs/read_write.c:866 vfs_writev+0x1aa/0x5e0 fs/read_write.c:939 do_writev+0x139/0x300 fs/read_write.c:982 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #4 (&port_lock_key){-.-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 serial8250_console_write+0x8dd/0xb20 drivers/tty/serial/8250/8250_port.c:3330 call_console_drivers kernel/printk/printk.c:1909 [inline] console_unlock+0x826/0xb30 kernel/printk/printk.c:2530 register_console kernel/printk/printk.c:2871 [inline] register_console+0x53d/0x800 kernel/printk/printk.c:2761 univ8250_console_init+0x3a/0x46 drivers/tty/serial/8250/8250_core.c:690 console_init+0x361/0x4fa kernel/printk/printk.c:2981 start_kernel+0x2f2/0x49b init/main.c:985 secondary_startup_64_no_verify+0xc2/0xcb -> #3 (console_owner){-.-.}-{0:0}: console_lock_spinning_enable kernel/printk/printk.c:1761 [inline] console_unlock+0x360/0xb30 kernel/printk/printk.c:2527 vprintk_emit+0x1da/0x4d0 kernel/printk/printk.c:2052 vprintk_func+0x8b/0x140 kernel/printk/printk_safe.c:401 printk+0xba/0xed kernel/printk/printk.c:2100 add_scan_area mm/kmemleak.c:803 [inline] kmemleak_scan_area+0x328/0x350 mm/kmemleak.c:1087 alloc_vmap_area+0x171/0x1d10 mm/vmalloc.c:1177 __get_vm_area_node+0x127/0x340 mm/vmalloc.c:2080 __vmalloc_node_range+0x13f/0x9e0 mm/vmalloc.c:2555 __vmalloc_node+0xb5/0x100 mm/vmalloc.c:2603 xt_copy_counters+0x2be/0x5b0 net/netfilter/x_tables.c:1091 do_add_counters net/ipv4/netfilter/ip_tables.c:1165 [inline] do_ipt_set_ctl+0x17f/0xa90 net/ipv4/netfilter/ip_tables.c:1633 nf_setsockopt+0x8b/0xf0 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0xe20/0x3580 net/ipv4/ip_sockglue.c:1435 tcp_setsockopt+0x139/0x2640 net/ipv4/tcp.c:3448 __sys_setsockopt+0x180/0x2a0 net/socket.c:2121 __do_sys_setsockopt net/socket.c:2132 [inline] __se_sys_setsockopt net/socket.c:2129 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2129 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&object->lock){..-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 __delete_object+0x87/0x100 mm/kmemleak.c:670 kmemleak_free_recursive include/linux/kmemleak.h:49 [inline] slab_free_hook mm/slub.c:1517 [inline] slab_free_freelist_hook+0x13a/0x180 mm/slub.c:1576 slab_free mm/slub.c:3149 [inline] kmem_cache_free+0xa7/0x310 mm/slub.c:3165 __sigqueue_free kernel/signal.c:611 [inline] collect_signal+0x2a4/0x520 kernel/signal.c:597 __dequeue_signal kernel/signal.c:619 [inline] dequeue_signal+0x322/0x620 kernel/signal.c:639 get_signal+0x6e9/0x2200 kernel/signal.c:2638 arch_do_signal+0x88/0x1b70 arch/x86/kernel/signal.c:805 exit_to_user_mode_loop kernel/entry/common.c:161 [inline] exit_to_user_mode_prepare+0xf7/0x160 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x38/0x230 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&sighand->siglock){..-.}-{2:2}: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x36/0x50 kernel/locking/spinlock.c:159 __lock_task_sighand+0xd3/0x2f0 kernel/signal.c:1391 lock_task_sighand include/linux/sched/signal.h:693 [inline] task_work_add+0x1db/0x2b0 kernel/task_work.c:58 io_req_task_work_add fs/io_uring.c:2064 [inline] __io_async_wake+0x40b/0x8d0 fs/io_uring.c:4977 __wake_up_common+0x14c/0x4c0 kernel/sched/wait.c:93 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:123 tty_ldisc_lock+0x40/0xb0 drivers/tty/tty_ldisc.c:335 tty_ldisc_hangup+0x204/0x690 drivers/tty/tty_ldisc.c:744 __tty_hangup.part.0+0x510/0x9b0 drivers/tty/tty_io.c:624 __tty_hangup drivers/tty/tty_io.c:574 [inline] tty_vhangup drivers/tty/tty_io.c:697 [inline] tty_ioctl+0x120e/0x1830 drivers/tty/tty_io.c:2683 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&tty->read_wait){....}-{2:2}: check_prev_add kernel/locking/lockdep.c:2986 [inline] check_prevs_add kernel/locking/lockdep.c:3111 [inline] validate_chain kernel/locking/lockdep.c:3726 [inline] __lock_acquire+0x29e3/0x5b00 kernel/locking/lockdep.c:4952 lock_acquire kernel/locking/lockdep.c:5562 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5527 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] io_poll_double_wake+0x1f8/0x550 fs/io_uring.c:5090 __wake_up_common+0x14c/0x4c0 kernel/sched/wait.c:93 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:123 tty_ldisc_lock+0x55/0xb0 drivers/tty/tty_ldisc.c:336 tty_ldisc_hangup+0x204/0x690 drivers/tty/tty_ldisc.c:744 __tty_hangup.part.0+0x510/0x9b0 drivers/tty/tty_io.c:624 __tty_hangup drivers/tty/tty_io.c:574 [inline] tty_vhangup drivers/tty/tty_io.c:697 [inline] tty_ioctl+0x120e/0x1830 drivers/tty/tty_io.c:2683 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &tty->read_wait --> &port_lock_key --> &tty->write_wait Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&tty->write_wait); lock(&port_lock_key); lock(&tty->write_wait); lock(&tty->read_wait); *** DEADLOCK *** 2 locks held by syz-executor.0/11463: #0: ffff88804897a1c0 (&tty->legacy_mutex){+.+.}-{3:3}, at: tty_lock+0xbd/0x120 drivers/tty/tty_mutex.c:19 #1: ffff88804897a528 (&tty->write_wait){-.-.}-{2:2}, at: __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 stack backtrace: CPU: 1 PID: 11463 Comm: syz-executor.0 Not tainted 5.10.109 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 check_noncircular+0x25f/0x2e0 kernel/locking/lockdep.c:2121 check_prev_add kernel/locking/lockdep.c:2986 [inline] check_prevs_add kernel/locking/lockdep.c:3111 [inline] validate_chain kernel/locking/lockdep.c:3726 [inline] __lock_acquire+0x29e3/0x5b00 kernel/locking/lockdep.c:4952 lock_acquire kernel/locking/lockdep.c:5562 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5527 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] io_poll_double_wake+0x1f8/0x550 fs/io_uring.c:5090 __wake_up_common+0x14c/0x4c0 kernel/sched/wait.c:93 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:123 tty_ldisc_lock+0x55/0xb0 drivers/tty/tty_ldisc.c:336 tty_ldisc_hangup+0x204/0x690 drivers/tty/tty_ldisc.c:744 __tty_hangup.part.0+0x510/0x9b0 drivers/tty/tty_io.c:624 __tty_hangup drivers/tty/tty_io.c:574 [inline] tty_vhangup drivers/tty/tty_io.c:697 [inline] tty_ioctl+0x120e/0x1830 drivers/tty/tty_io.c:2683 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x196/0x210 fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f18aec0ab19 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f18ac180188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f18aed1df60 RCX: 00007f18aec0ab19 RDX: 0000000000000000 RSI: 0000000000005437 RDI: 0000000000000004 RBP: 00007f18aec64f6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff3e5a31cf R14: 00007f18ac180300 R15: 0000000000022000 kauditd_printk_skb: 13 callbacks suppressed audit: type=1326 audit(1649944871.717:90): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.717:91): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=68 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.717:92): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.717:93): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=69 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 netlink: 56 bytes leftover after parsing attributes in process `syz-executor.1'. audit: type=1326 audit(1649944871.717:94): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.719:95): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=70 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.719:96): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.719:97): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=317 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 audit: type=1326 audit(1649944871.728:98): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=202 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 FAT-fs (loop4): Unrecognized mount option "./file1" or missing value audit: type=1326 audit(1649944871.728:99): auid=0 uid=0 gid=0 ses=4 subj=system_u:system_r:kernel_t:s0 pid=11475 comm="syz-executor.2" exe="/syz-executor.2" sig=0 arch=c000003e syscall=68 compat=0 ip=0x7fc3a60acb19 code=0x7ffc0000 netlink: 56 bytes leftover after parsing attributes in process `syz-executor.1'. FAT-fs (loop4): Unrecognized mount option "./file1" or missing value netlink: 56 bytes leftover after parsing attributes in process `syz-executor.3'. Bluetooth: hci7: command 0x0409 tx timeout Bluetooth: hci7: command 0x041b tx timeout ieee80211 phy34: Selected rate control algorithm 'minstrel_ht' wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready ieee80211 phy35: Selected rate control algorithm 'minstrel_ht' wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50 IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready