BUG: sleeping function called from invalid context at kernel/workqueue.c:3039 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/0 preempt_count: 101, expected: 0 RCU nest depth: 0, expected: 0 1 lock held by swapper/0/0: #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: 3694993 hardirqs last enabled at (3694992): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (3694992): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (3694993): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (3694993): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (3694940): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (3694940): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (3694985): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (3694985): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 Preemption disabled at: [] schedule_preempt_disabled+0x19/0x20 kernel/sched/core.c:6429 CPU: 0 PID: 0 Comm: swapper/0 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:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline] RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline] RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline] RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] RIP: 0010:acpi_idle_do_entry+0x1c6/0x250 drivers/acpi/processor_idle.c:551 Code: 89 de e8 4d 42 21 f8 84 db 75 ac e8 64 3e 21 f8 e8 7f 87 27 f8 eb 0c e8 58 3e 21 f8 0f 00 2d 41 d5 ba 00 e8 4c 3e 21 f8 fb f4 <9c> 5b 81 e3 00 02 00 00 fa 31 ff 48 89 de e8 c7 40 21 f8 48 85 db RSP: 0018:ffffffff8b807d60 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffffffff8b8bc6c0 RSI: ffffffff8956a504 RDI: 0000000000000000 RBP: ffff8881445cc064 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff817e2ca8 R11: 0000000000000000 R12: 0000000000000001 R13: ffff8881445cc000 R14: ffff8881445cc064 R15: ffff888017e59004 acpi_idle_enter+0x361/0x500 drivers/acpi/processor_idle.c:686 cpuidle_enter_state+0x1b1/0xc80 drivers/cpuidle/cpuidle.c:237 cpuidle_enter+0x4a/0xa0 drivers/cpuidle/cpuidle.c:351 call_cpuidle kernel/sched/idle.c:158 [inline] cpuidle_idle_call kernel/sched/idle.c:239 [inline] do_idle+0x3e8/0x590 kernel/sched/idle.c:306 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_kernel+0x47a/0x49b init/main.c:1141 secondary_startup_64_no_verify+0xc3/0xcb BUG: sleeping function called from invalid context at kernel/workqueue.c:3039 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 17852, name: systemd-udevd preempt_count: 100, expected: 0 RCU nest depth: 0, expected: 0 2 locks held by systemd-udevd/17852: #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: 963105 hardirqs last enabled at (963104): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (963104): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (963105): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (963105): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (962486): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (962486): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (963101): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (963101): [] __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: 17852 Comm: systemd-udevd 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:__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:ffffc90004bb7900 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 RDX: ffff88807ad23a80 RSI: ffffffff83aff9c1 RDI: 0000000000000003 RBP: ffff888022017480 R08: 0000000000000000 R09: 0000000000000002 R10: ffffffff83aff9fa R11: 0000000000000010 R12: 0000000000000020 R13: 00000000000003a7 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:0x7f0aa89d52e2 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:00007ffc8f859b68 EFLAGS: 00000246 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0aa89d52e2 RDX: 00007ffc8f859b80 RSI: 00007ffc8f859b80 RDI: 000000000000000f RBP: 00007ffc8f859d00 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000080000 R11: 0000000000000246 R12: 0000559d1a1c2f40 R13: 0000559d1a1ae9e0 R14: 00007ffc8f859c60 R15: 00007ffc8f859cc0 BUG: sleeping function called from invalid context at kernel/workqueue.c:3039 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 20977, name: syz-executor.2 preempt_count: 101, expected: 0 RCU nest depth: 1, expected: 0 2 locks held by syz-executor.2/20977: #0: ffffffff8bb828a0 (rcu_read_lock){....}-{1:2}, at: bpf_test_timer_enter+0x0/0x160 net/bpf/test_run.c:267 #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: 7153 hardirqs last enabled at (7152): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (7152): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (7153): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (7153): [] _raw_spin_lock_irqsave+0x4e/0x50 kernel/locking/spinlock.c:162 softirqs last enabled at (7010): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (7010): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 softirqs last disabled at (7133): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (7133): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 Preemption disabled at: [] try_get_fmt_tmp_buf kernel/bpf/helpers.c:728 [inline] [] bpf_bprintf_prepare+0xad7/0x11a0 kernel/bpf/helpers.c:778 CPU: 0 PID: 20977 Comm: syz-executor.2 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:__sanitizer_cov_trace_pc+0x4c/0x60 kernel/kcov.c:205 Code: 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> 83 c0 01 48 39 c2 76 07 48 89 34 c1 48 89 01 c3 0f 1f 00 41 55 RSP: 0018:ffffc90004c977c8 EFLAGS: 00000246 RAX: 000000000003ffff RBX: 0000000000000002 RCX: ffffc900045a2000 RDX: 0000000000040000 RSI: ffffffff818c34d7 RDI: 0000000000000003 RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000025 R10: ffffffff818c34c8 R11: 0000000000000025 R12: 0000000000000025 R13: ffff8880b9c342a0 R14: dffffc0000000000 R15: ffffc90004c979b8 bpf_bprintf_prepare+0x207/0x11a0 kernel/bpf/helpers.c:794 ____bpf_trace_printk kernel/trace/bpf_trace.c:377 [inline] bpf_trace_printk+0xab/0x170 kernel/trace/bpf_trace.c:368 bpf_prog_2855a0054ed1d5d6+0x2f/0x78c __bpf_prog_run include/linux/filter.h:626 [inline] bpf_prog_run_xdp include/linux/filter.h:801 [inline] bpf_test_run+0x2b1/0x9d0 net/bpf/test_run.c:118 bpf_prog_test_run_xdp+0xb9c/0xd40 net/bpf/test_run.c:810 bpf_prog_test_run kernel/bpf/syscall.c:3349 [inline] __sys_bpf+0x1839/0x5970 kernel/bpf/syscall.c:4651 __do_sys_bpf kernel/bpf/syscall.c:4737 [inline] __se_sys_bpf kernel/bpf/syscall.c:4735 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4735 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:0x7f1f3426db49 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:00007f1f32de3188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f1f34380f60 RCX: 00007f1f3426db49 RDX: 0000000000000048 RSI: 0000000020000140 RDI: 000000000000000a RBP: 00007f1f342c8012 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffeb841055f R14: 00007f1f32de3300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 89 de mov %ebx,%esi 2: e8 4d 42 21 f8 callq 0xf8214254 7: 84 db test %bl,%bl 9: 75 ac jne 0xffffffb7 b: e8 64 3e 21 f8 callq 0xf8213e74 10: e8 7f 87 27 f8 callq 0xf8278794 15: eb 0c jmp 0x23 17: e8 58 3e 21 f8 callq 0xf8213e74 1c: 0f 00 2d 41 d5 ba 00 verw 0xbad541(%rip) # 0xbad564 23: e8 4c 3e 21 f8 callq 0xf8213e74 28: fb sti 29: f4 hlt * 2a: 9c pushfq <-- trapping instruction 2b: 5b pop %rbx 2c: 81 e3 00 02 00 00 and $0x200,%ebx 32: fa cli 33: 31 ff xor %edi,%edi 35: 48 89 de mov %rbx,%rsi 38: e8 c7 40 21 f8 callq 0xf8214104 3d: 48 85 db test %rbx,%rbx