BUG: sleeping function called from invalid context at kernel/workqueue.c:3039 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 5607, name: systemd-udevd preempt_count: 100, expected: 0 RCU nest depth: 0, expected: 0 2 locks held by systemd-udevd/5607: #0: ffffffff8c3628d8 (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:35 [inline] #1: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411 irq event stamp: 5823 hardirqs last enabled at (5822): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (5822): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (5823): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (5823): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (5366): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (5366): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (5801): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (5801): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 Preemption disabled at: [] softirq_handle_begin kernel/softirq.c:396 [inline] [] __do_softirq+0xe1/0x9c2 kernel/softirq.c:534 CPU: 0 PID: 5607 Comm: systemd-udevd Not tainted 5.16.0-rc4-next-20211208-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9583 start_flush_work kernel/workqueue.c:3039 [inline] __flush_work+0x109/0xb10 kernel/workqueue.c:3103 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3191 hci_cmd_sync_cancel net/bluetooth/hci_sync.c:346 [inline] hci_cmd_sync_cancel+0xe1/0x170 net/bluetooth/hci_sync.c:338 btusb_intr_complete+0x3d3/0x4a0 drivers/bluetooth/btusb.c:969 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:__sanitizer_cov_trace_pc+0x37/0x60 kernel/kcov.c:200 Code: 81 e1 00 01 00 00 65 48 8b 14 25 40 70 02 00 a9 00 01 ff 00 74 0e 85 c9 74 35 8b 82 ac 15 00 00 85 c0 74 2b 8b 82 88 15 00 00 <83> f8 02 75 20 48 8b 8a 90 15 00 00 8b 92 8c 15 00 00 48 8b 01 48 RSP: 0018:ffffc9000b477900 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000009 RCX: 0000000000000000 RDX: ffff8880781357c0 RSI: ffffffff83aff9c1 RDI: 0000000000000003 RBP: ffff88802320e080 R08: 0000000000000000 R09: 0000000000000009 R10: ffffffff83aff9fa R11: 0000000000000010 R12: 0000000000000026 R13: 0000000000000282 R14: dffffc0000000000 R15: 0000000000000000 tomoyo_domain_quota_is_ok+0x2f1/0x550 security/tomoyo/util.c:1093 tomoyo_supervisor+0x2f2/0xf00 security/tomoyo/common.c:2089 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x270/0x3a0 security/tomoyo/file.c:573 tomoyo_path_perm+0x2f0/0x400 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1326 vfs_getattr fs/stat.c:157 [inline] vfs_fstat+0x43/0xb0 fs/stat.c:182 __do_sys_newfstat+0x81/0x100 fs/stat.c:422 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+0x44/0xae RIP: 0033:0x7f2e6a3792e2 Code: 48 8b 05 b9 db 2b 00 64 c7 00 16 00 00 00 b8 ff ff ff ff c3 0f 1f 40 00 83 ff 01 77 33 48 63 fe b8 05 00 00 00 48 89 d6 0f 05 <48> 3d 00 f0 ff ff 77 06 f3 c3 0f 1f 40 00 48 8b 15 81 db 2b 00 f7 RSP: 002b:00007fff4ecfbf88 EFLAGS: 00000246 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f2e6a3792e2 RDX: 00007fff4ecfbfa0 RSI: 00007fff4ecfbfa0 RDI: 0000000000000007 RBP: 00007fff4ecfc150 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000080000 R11: 0000000000000246 R12: 000055e4c19c2eb0 R13: 000055e4c19c0220 R14: 000055e4c19c1c20 R15: 00007fff4ecfc110 BUG: sleeping function called from invalid context at kernel/workqueue.c:3039 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 5710, name: syz-executor.4 preempt_count: 101, expected: 0 RCU nest depth: 0, expected: 0 1 lock held by syz-executor.4/5710: #0: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #0: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411 irq event stamp: 131921 hardirqs last enabled at (131920): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (131920): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (131921): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (131921): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (124922): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (124922): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (131917): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (131917): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 0 PID: 5710 Comm: syz-executor.4 Tainted: G W 5.16.0-rc4-next-20211208-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9583 start_flush_work kernel/workqueue.c:3039 [inline] __flush_work+0x109/0xb10 kernel/workqueue.c:3103 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3191 hci_cmd_sync_cancel net/bluetooth/hci_sync.c:346 [inline] hci_cmd_sync_cancel+0xe1/0x170 net/bluetooth/hci_sync.c:338 btusb_intr_complete+0x3d3/0x4a0 drivers/bluetooth/btusb.c:969 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:trace_lock_acquire include/trace/events/lock.h:13 [inline] RIP: 0010:lock_acquire+0x436/0x510 kernel/locking/lockdep.c:5610 Code: fa ff 74 24 08 e8 8a f7 fe ff 5e 5f 65 ff 0d e1 90 a5 7e 0f 85 63 fc ff ff e8 45 66 a3 ff e9 59 fc ff ff 65 ff 05 ca 90 a5 7e <48> 8b 05 23 4c 21 0c e8 3e d7 05 00 85 c0 74 17 65 ff 0d b3 90 a5 RSP: 0018:ffffc90002b7fbd8 EFLAGS: 00000283 RAX: 0000000000000001 RBX: 1ffff9200056ff7d RCX: ffffffff815cdbb8 RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8d926690 RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff8d926697 R10: fffffbfff1b24cd2 R11: 0000000000000000 R12: 0000000000000001 R13: 0000000000000000 R14: ffff88801cd0ab28 R15: 0000000000000000 __might_fault mm/memory.c:5250 [inline] __might_fault+0x104/0x170 mm/memory.c:5235 do_recvmmsg+0x27a/0x6d0 net/socket.c:2770 __sys_recvmmsg net/socket.c:2843 [inline] __do_sys_recvmmsg net/socket.c:2866 [inline] __se_sys_recvmmsg net/socket.c:2859 [inline] __x64_sys_recvmmsg+0x20b/0x260 net/socket.c:2859 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+0x44/0xae RIP: 0033:0x7f64538d9af9 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:00007f645284f188 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f64539ecf60 RCX: 00007f64538d9af9 RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f6453933ff7 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc97add5ff R14: 00007f645284f300 R15: 0000000000022000 BUG: sleeping function called from invalid context at kernel/workqueue.c:3039 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 1883, name: kworker/0:8 preempt_count: 100, expected: 0 RCU nest depth: 0, expected: 0 6 locks held by kworker/0:8/1883: #0: ffff888141593938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888141593938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: arch_atomic_long_set include/linux/atomic/atomic-long.h:41 [inline] #0: ffff888141593938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: atomic_long_set include/linux/atomic/atomic-instrumented.h:1280 [inline] #0: ffff888141593938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:635 [inline] #0: ffff888141593938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:662 [inline] #0: ffff888141593938 ((wq_completion)usb_hub_wq){+.+.}-{0:0}, at: process_one_work+0x896/0x1690 kernel/workqueue.c:2289 #1: ffffc9000c4cfdb0 ((work_completion)(&hub->events)){+.+.}-{0:0}, at: process_one_work+0x8ca/0x1690 kernel/workqueue.c:2293 #2: ffff888147da9220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline] #2: ffff888147da9220 (&dev->mutex){....}-{3:3}, at: hub_event+0x1c1/0x4460 drivers/usb/core/hub.c:5671 #3: ffff888030185220 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:760 [inline] #3: ffff888030185220 (&dev->mutex){....}-{3:3}, at: usb_disconnect.cold+0x43/0x78e drivers/usb/core/hub.c:2216 #4: ffffffff8c692ee8 (dpm_list_mtx){+.+.}-{3:3}, at: device_pm_remove+0x93/0x360 drivers/base/power/main.c:159 #5: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #5: ffffc90000007d70 ((&dum_hcd->timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1411 irq event stamp: 95451 hardirqs last enabled at (95450): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (95450): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (95451): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (95451): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (95296): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (95296): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (95447): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (95447): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 Preemption disabled at: [] softirq_handle_begin kernel/softirq.c:396 [inline] [] __do_softirq+0xe1/0x9c2 kernel/softirq.c:534 CPU: 0 PID: 1883 Comm: kworker/0:8 Tainted: G W 5.16.0-rc4-next-20211208-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: usb_hub_wq hub_event Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9583 start_flush_work kernel/workqueue.c:3039 [inline] __flush_work+0x109/0xb10 kernel/workqueue.c:3103 __cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3191 hci_cmd_sync_cancel net/bluetooth/hci_sync.c:346 [inline] hci_cmd_sync_cancel+0xe1/0x170 net/bluetooth/hci_sync.c:338 btusb_intr_complete+0x3d3/0x4a0 drivers/bluetooth/btusb.c:969 __usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726 dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1987 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0010:check_kcov_mode+0x9/0x40 kernel/kcov.c:166 Code: 59 fe ff ff 48 8b 7c 24 08 e8 03 3b 4b 00 e9 61 fd ff ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 65 8b 05 59 91 8a 7e 89 c2 <81> e2 00 01 00 00 a9 00 01 ff 00 74 10 31 c0 85 d2 74 15 8b 96 ac RSP: 0018:ffffc9000c4cf8a0 EFLAGS: 00000246 RAX: 0000000080000000 RBX: ffff88807e751238 RCX: ffff888035bf1d40 RDX: 0000000080000000 RSI: ffff888035bf1d40 RDI: 0000000000000003 RBP: ffff88807e751010 R08: 0000000000000000 R09: 0000000000000001 R10: ffffffff8482cece R11: 0000000000000000 R12: ffff88807e7511ec R13: 0000000000000001 R14: ffff88807e751240 R15: dffffc0000000000 write_comp_data kernel/kcov.c:221 [inline] __sanitizer_cov_trace_const_cmp1+0x22/0x80 kernel/kcov.c:273 __list_del_entry include/linux/list.h:134 [inline] list_del_init include/linux/list.h:206 [inline] device_pm_remove+0xae/0x360 drivers/base/power/main.c:160 device_del+0x50a/0xd50 drivers/base/core.c:3582 device_unregister+0x1f/0xc0 drivers/base/core.c:3613 usb_remove_ep_devs+0x3e/0x80 drivers/usb/core/endpoint.c:188 remove_intf_ep_devs drivers/usb/core/message.c:1267 [inline] usb_disable_device+0x306/0x7b0 drivers/usb/core/message.c:1418 usb_disconnect.cold+0x27a/0x78e drivers/usb/core/hub.c:2225 hub_port_connect drivers/usb/core/hub.c:5197 [inline] hub_port_connect_change drivers/usb/core/hub.c:5497 [inline] port_event drivers/usb/core/hub.c:5643 [inline] hub_event+0x1c9c/0x4460 drivers/usb/core/hub.c:5725 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2318 worker_thread+0x658/0x11f0 kernel/workqueue.c:2465 kthread+0x405/0x4f0 kernel/kthread.c:345 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 ---------------- Code disassembly (best guess): 0: 81 e1 00 01 00 00 and $0x100,%ecx 6: 65 48 8b 14 25 40 70 mov %gs:0x27040,%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 ac 15 00 00 mov 0x15ac(%rdx),%eax 20: 85 c0 test %eax,%eax 22: 74 2b je 0x4f 24: 8b 82 88 15 00 00 mov 0x1588(%rdx),%eax * 2a: 83 f8 02 cmp $0x2,%eax <-- trapping instruction 2d: 75 20 jne 0x4f 2f: 48 8b 8a 90 15 00 00 mov 0x1590(%rdx),%rcx 36: 8b 92 8c 15 00 00 mov 0x158c(%rdx),%edx 3c: 48 8b 01 mov (%rcx),%rax 3f: 48 rex.W