__do_sys_newfstatat+0x91/0x110 fs/stat.c:425 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22b21251da ================================ WARNING: inconsistent lock state 5.19.0-rc7-syzkaller-00135-g68e77ffbfd06 #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. udevd/20881 [HC0[0]:SC1[1]:HE0:SE0] takes: ffffffff8beb8f38 (vmap_area_lock){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] ffffffff8beb8f38 (vmap_area_lock){+.?.}-{2:2}, at: find_vmap_area+0x1c/0x130 mm/vmalloc.c:1805 {SOFTIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5665 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] alloc_vmap_area+0xa49/0x1f00 mm/vmalloc.c:1586 __get_vm_area_node+0x142/0x3f0 mm/vmalloc.c:2453 get_vm_area_caller+0x43/0x50 mm/vmalloc.c:2506 __ioremap_caller.constprop.0+0x292/0x600 arch/x86/mm/ioremap.c:280 acpi_os_ioremap include/acpi/acpi_io.h:13 [inline] acpi_map drivers/acpi/osl.c:296 [inline] acpi_os_map_iomem+0x463/0x550 drivers/acpi/osl.c:355 acpi_tb_acquire_table+0xd8/0x209 drivers/acpi/acpica/tbdata.c:142 acpi_tb_validate_table drivers/acpi/acpica/tbdata.c:317 [inline] acpi_tb_validate_table+0x50/0x8c drivers/acpi/acpica/tbdata.c:308 acpi_tb_verify_temp_table+0x84/0x674 drivers/acpi/acpica/tbdata.c:504 acpi_reallocate_root_table+0x374/0x3e0 drivers/acpi/acpica/tbxface.c:180 acpi_early_init+0x13a/0x438 drivers/acpi/bus.c:1199 start_kernel+0x3cf/0x48f init/main.c:1098 secondary_startup_64_no_verify+0xce/0xdb irq event stamp: 18463 hardirqs last enabled at (18462): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (18462): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (18463): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (18463): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (10842): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last enabled at (10842): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 softirqs last disabled at (18455): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (18455): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(vmap_area_lock); lock(vmap_area_lock); *** DEADLOCK *** 6 locks held by udevd/20881: #0: ffffffff8c5adee8 (tomoyo_ss){....}-{0:0}, at: tomoyo_path_perm+0x1c1/0x400 security/tomoyo/file.c:847 #1: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:31 [inline] #1: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1464 #2: ffff88807927a230 (&dev->event_lock#2){-.-.}-{2:2}, at: input_event drivers/input/input.c:456 [inline] #2: ffff88807927a230 (&dev->event_lock#2){-.-.}-{2:2}, at: input_event+0x7b/0xb0 drivers/input/input.c:449 #3: ffffffff8bd87120 (rcu_read_lock){....}-{1:2}, at: input_pass_values.part.0+0x0/0x710 drivers/input/input.c:884 #4: ffffffff8c806878 (kbd_event_lock){..-.}-{2:2}, at: spin_lock include/linux/spinlock.h:349 [inline] #4: ffffffff8c806878 (kbd_event_lock){..-.}-{2:2}, at: kbd_event+0x86/0x1780 drivers/tty/vt/keyboard.c:1537 #5: ffffffff8bd87120 (rcu_read_lock){....}-{1:2}, at: show_state_filter+0x0/0x300 kernel/sched/core.c:8763 stack backtrace: CPU: 0 PID: 20881 Comm: udevd Not tainted 5.19.0-rc7-syzkaller-00135-g68e77ffbfd06 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3961 [inline] valid_state kernel/locking/lockdep.c:3973 [inline] mark_lock_irq kernel/locking/lockdep.c:4176 [inline] mark_lock.part.0.cold+0x18/0xd8 kernel/locking/lockdep.c:4632 mark_lock kernel/locking/lockdep.c:4596 [inline] mark_usage kernel/locking/lockdep.c:4527 [inline] __lock_acquire+0x11e7/0x5660 kernel/locking/lockdep.c:5007 lock_acquire kernel/locking/lockdep.c:5665 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:349 [inline] find_vmap_area+0x1c/0x130 mm/vmalloc.c:1805 check_heap_object mm/usercopy.c:176 [inline] __check_object_size mm/usercopy.c:250 [inline] __check_object_size+0x1f8/0x700 mm/usercopy.c:212 check_object_size include/linux/thread_info.h:199 [inline] __copy_from_user_inatomic include/linux/uaccess.h:62 [inline] copy_from_user_nmi arch/x86/lib/usercopy.c:47 [inline] copy_from_user_nmi+0xcb/0x130 arch/x86/lib/usercopy.c:31 copy_code arch/x86/kernel/dumpstack.c:91 [inline] show_opcodes+0x59/0xb0 arch/x86/kernel/dumpstack.c:121 show_iret_regs+0xd/0x33 arch/x86/kernel/dumpstack.c:149 __show_regs+0x1e/0x60 arch/x86/kernel/process_64.c:74 show_trace_log_lvl+0x25b/0x2ba arch/x86/kernel/dumpstack.c:292 sched_show_task kernel/sched/core.c:8801 [inline] sched_show_task+0x44c/0x5c0 kernel/sched/core.c:8775 show_state_filter+0x13e/0x300 kernel/sched/core.c:8846 k_spec drivers/tty/vt/keyboard.c:667 [inline] k_spec+0xe1/0x130 drivers/tty/vt/keyboard.c:656 kbd_keycode drivers/tty/vt/keyboard.c:1524 [inline] kbd_event+0xcdd/0x1780 drivers/tty/vt/keyboard.c:1543 input_to_handler+0x3b9/0x4c0 drivers/input/input.c:129 input_pass_values.part.0+0x230/0x710 drivers/input/input.c:156 input_pass_values drivers/input/input.c:426 [inline] input_handle_event+0x67e/0x1440 drivers/input/input.c:426 input_event drivers/input/input.c:457 [inline] input_event+0x8e/0xb0 drivers/input/input.c:449 hidinput_hid_event+0x79d/0x2010 drivers/hid/hid-input.c:1631 hid_process_event+0x491/0x570 drivers/hid/hid-core.c:1527 hid_input_array_field+0x4d7/0x660 drivers/hid/hid-core.c:1639 hid_process_report drivers/hid/hid-core.c:1681 [inline] hid_report_raw_event+0xa8a/0x1280 drivers/hid/hid-core.c:1998 hid_input_report+0x360/0x4c0 drivers/hid/hid-core.c:2065 hid_irq_in+0x50e/0x690 drivers/hid/usbhid/hid-core.c:284 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1670 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1747 dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1988 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1474 expire_timers kernel/time/timer.c:1519 [inline] __run_timers.part.0+0x679/0xa80 kernel/time/timer.c:1790 __run_timers kernel/time/timer.c:1768 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1803 __do_softirq+0x29b/0x9c2 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:__sanitizer_cov_trace_pc+0x37/0x60 kernel/kcov.c:200 Code: 81 e1 00 01 00 00 65 48 8b 14 25 80 6f 02 00 a9 00 01 ff 00 74 0e 85 c9 74 35 8b 82 a4 15 00 00 85 c0 74 2b 8b 82 80 15 00 00 <83> f8 02 75 20 48 8b 8a 88 15 00 00 8b 92 84 15 00 00 48 8b 01 48 RSP: 0018:ffffc90002dcf958 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 000000000aaea121 RCX: 0000000000000000 RDX: ffff88801f0c0000 RSI: ffffffff83c45e40 RDI: 0000000000000004 RBP: 000000007ae0c562 R08: 0000000000000004 R09: 000000007ae0c562 R10: 000000000aaea121 R11: 0000000000000001 R12: 0000000000000000 R13: ffff88801bb21600 R14: ffff88814a1f7fa8 R15: ffff888026a8a620 tomoyo_path_matches_pattern+0x110/0x280 security/tomoyo/util.c:948 tomoyo_compare_name_union security/tomoyo/file.c:87 [inline] tomoyo_compare_name_union security/tomoyo/file.c:82 [inline] tomoyo_check_path_acl security/tomoyo/file.c:260 [inline] tomoyo_check_path_acl+0x180/0x210 security/tomoyo/file.c:252 tomoyo_check_acl+0x13c/0x450 security/tomoyo/domain.c:175 tomoyo_path_permission security/tomoyo/file.c:586 [inline] tomoyo_path_permission+0x1ff/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1344 vfs_getattr fs/stat.c:157 [inline] vfs_statx+0x16a/0x390 fs/stat.c:232 vfs_fstatat+0x8c/0xb0 fs/stat.c:255 __do_sys_newfstatat+0x91/0x110 fs/stat.c:425 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22b21251da Code: 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 0b 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca b8 06 01 00 00 0f 05 <3d> 00 f0 ff ff 77 07 31 c0 c3 0f 1f 40 00 48 8b 15 69 fc 0c 00 f7 RSP: 002b:00007ffd8d7e3858 EFLAGS: 00000206 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 000055af6d039440 RCX: 00007f22b21251da RDX: 00007ffd8d7e3868 RSI: 00007ffd8d7e38f8 RDI: 00000000ffffff9c RBP: 000055af6be990e6 R08: 000055af6be990e6 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 0000000000000000 R13: 000055af6d039530 R14: 00007ffd8d7e38f8 R15: 000055af6be98a7c Code: 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 0b 00 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 41 89 ca b8 06 01 00 00 0f 05 <3d> 00 f0 ff ff 77 07 31 c0 c3 0f 1f 40 00 48 8b 15 69 fc 0c 00 f7 RSP: 002b:00007ffd8d7e3858 EFLAGS: 00000206 ORIG_RAX: 0000000000000106 RAX: ffffffffffffffda RBX: 000055af6d039440 RCX: 00007f22b21251da RDX: 00007ffd8d7e3868 RSI: 00007ffd8d7e38f8 RDI: 00000000ffffff9c RBP: 000055af6be990e6 R08: 000055af6be990e6 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000206 R12: 0000000000000000 R13: 000055af6d039530 R14: 00007ffd8d7e38f8 R15: 000055af6be98a7c task:udevd state:S stack:27856 pid:20887 ppid: 2976 flags:0x00000000 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa00/0x4b50 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_hrtimeout_range_clock+0x343/0x390 kernel/time/hrtimer.c:2296 ep_poll fs/eventpoll.c:1856 [inline] do_epoll_wait+0x1290/0x1930 fs/eventpoll.c:2234 __do_sys_epoll_wait fs/eventpoll.c:2246 [inline] __se_sys_epoll_wait fs/eventpoll.c:2241 [inline] __x64_sys_epoll_wait+0x158/0x270 fs/eventpoll.c:2241 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22b2133e46 RSP: 002b:00007ffd8d7eb0a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f22b2133e46 RDX: 0000000000000004 RSI: 00007ffd8d7eb0e8 RDI: 0000000000000004 RBP: 000055af6d039190 R08: 0000000000000007 R09: 000055af6d02d720 R10: 00000000ffffffff R11: 0000000000000246 R12: 000055af6d04e230 R13: 00007ffd8d7eb0e8 R14: 00000000ffffffff R15: 000055af6d013910 task:udevd state:S stack:27384 pid:20888 ppid: 2976 flags:0x00000000 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa00/0x4b50 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_hrtimeout_range_clock+0x343/0x390 kernel/time/hrtimer.c:2296 ep_poll fs/eventpoll.c:1856 [inline] do_epoll_wait+0x1290/0x1930 fs/eventpoll.c:2234 __do_sys_epoll_wait fs/eventpoll.c:2246 [inline] __se_sys_epoll_wait fs/eventpoll.c:2241 [inline] __x64_sys_epoll_wait+0x158/0x270 fs/eventpoll.c:2241 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22b2133e46 RSP: 002b:00007ffd8d7eb0a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f22b2133e46 RDX: 0000000000000004 RSI: 00007ffd8d7eb0e8 RDI: 0000000000000004 RBP: 000055af6d03f220 R08: 0000000000000007 R09: 000055af6d02d720 R10: 00000000ffffffff R11: 0000000000000246 R12: 000055af6d06a000 R13: 00007ffd8d7eb0e8 R14: 00000000ffffffff R15: 000055af6d013910 task:udevd state:S stack:27432 pid:20889 ppid: 2976 flags:0x00000000 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa00/0x4b50 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_hrtimeout_range_clock+0x343/0x390 kernel/time/hrtimer.c:2296 ep_poll fs/eventpoll.c:1856 [inline] do_epoll_wait+0x1290/0x1930 fs/eventpoll.c:2234 __do_sys_epoll_wait fs/eventpoll.c:2246 [inline] __se_sys_epoll_wait fs/eventpoll.c:2241 [inline] __x64_sys_epoll_wait+0x158/0x270 fs/eventpoll.c:2241 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f22b2133e46 RSP: 002b:00007ffd8d7eb0a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e8 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f22b2133e46 RDX: 0000000000000004 RSI: 00007ffd8d7eb0e8 RDI: 0000000000000004 RBP: 000055af6d039190 R08: 0000000000000007 R09: 000055af6d01cb70 R10: 00000000ffffffff R11: 0000000000000246 R12: 000055af6d0356e0 R13: 00007ffd8d7eb0e8 R14: 0000000000000008 R15: 000055af6d013910 task:udevd state:R running task stack:32592 pid:20890 ppid: 2976 flags:0x00004000 Call Trace: __switch_to_asm+0x70/0x70 arch/x86/entry/entry_64.S:275 task:syz-executor.1 state:S stack:28032 pid:20891 ppid: 3657 flags:0x00000000 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa00/0x4b50 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 freezable_schedule include/linux/freezer.h:172 [inline] futex_wait_queue+0x144/0x3b0 kernel/futex/waitwake.c:355 futex_wait+0x2c9/0x670 kernel/futex/waitwake.c:656 do_futex+0x1af/0x300 kernel/futex/syscalls.c:106 __do_sys_futex kernel/futex/syscalls.c:183 [inline] __se_sys_futex kernel/futex/syscalls.c:164 [inline] __x64_sys_futex+0x1b0/0x4a0 kernel/futex/syscalls.c:164 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7efeba689209 RSP: 002b:00007efebaccfb98 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007efeba79bf6c RCX: 00007efeba689209 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007efeba79bf6c RBP: 00007efeba79bf60 R08: 00007ffdaab8a080 R09: 0000000000000000 R10: 00007efebaccfc80 R11: 0000000000000246 R12: 00000000002d5d70 R13: 00007efebaccfc80 R14: 00007efebaccfca0 R15: 0000000000000bea task:syz-executor.1 state:S stack:28408 pid:20892 ppid: 3657 flags:0x00000000 Call Trace: context_switch kernel/sched/core.c:5146 [inline] __schedule+0xa00/0x4b50 kernel/sched/core.c:6458 schedule+0xd2/0x1f0 kernel/sched/core.c:6530 schedule_timeout+0x1db/0x2a0 kernel/time/timer.c:1911 ___down_common kernel/locking/semaphore.c:225 [inline] __down_common+0x363/0x770 kernel/locking/semaphore.c:246 down_interruptible+0x7b/0xa0 kernel/locking/semaphore.c:87 raw_event_queue_fetch drivers/usb/gadget/legacy/raw_gadget.c:99 [inline] raw_ioctl_event_fetch drivers/usb/gadget/legacy/raw_gadget.c:588 [inline] raw_ioctl+0x1010/0x2780 drivers/usb/gadget/legacy/raw_gadget.c:1256 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7efeba688fc7 RSP: 002b:00007efebb86f098 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007efebb870110 RCX: 00007efeba688fc7 RDX: 00007efebb870110 RSI: 0000000080085502 RDI: 0000000000000003 RBP: 0000000000000003 R08: 000000000000ffff R09: 000000000000000b R10: 00007efebb86f140 R11: 0000000000000246 R12: 0000000800000000 R13: 0000000000000000 R14: 0000000020000000 R15: 00007efeba6eecd5 INFO: lockdep is turned off. keytouch 0003:0926:3333.0408: usb_submit_urb(ctrl) failed: -19 keytouch 0003:0926:3333.040C: usb_submit_urb(ctrl) failed: -19 ---------------- Code disassembly (best guess): 0: 81 e1 00 01 00 00 and $0x100,%ecx 6: 65 48 8b 14 25 80 6f mov %gs:0x26f80,%rdx d: 02 00 f: a9 00 01 ff 00 test $0xff0100,%eax 14: 74 0e je 0x24 16: 85 c9 test %ecx,%ecx 18: 74 35 je 0x4f 1a: 8b 82 a4 15 00 00 mov 0x15a4(%rdx),%eax 20: 85 c0 test %eax,%eax 22: 74 2b je 0x4f 24: 8b 82 80 15 00 00 mov 0x1580(%rdx),%eax * 2a: 83 f8 02 cmp $0x2,%eax <-- trapping instruction 2d: 75 20 jne 0x4f 2f: 48 8b 8a 88 15 00 00 mov 0x1588(%rdx),%rcx 36: 8b 92 84 15 00 00 mov 0x1584(%rdx),%edx 3c: 48 8b 01 mov (%rcx),%rax 3f: 48 rex.W