syzbot


BUG: workqueue leaked atomic, lock or RCU: syz.NUM.NUM[NUM] (2)

Status: moderation: reported on 2025/06/09 08:38
Subsystems: usb lsm
[Documentation on labels]
Reported-by: syzbot+de945dacfdde6697bfc4@syzkaller.appspotmail.com
First crash: 157d, last: 26d
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: workqueue leaked atomic, lock or RCU: syz.NUM.NUM[NUM] mm usb -1 4 312d 359d 0/29 auto-obsoleted due to no activity on 2025/04/01 02:02

Sample crash report:
BUG: workqueue leaked atomic, lock or RCU: syz.5.2060[13867]
     preempt=0x00000101 lock=3->0 RCU=0->0 workfn=usb_giveback_urb_bh
INFO: lockdep is turned off.
CPU: 0 UID: 0 PID: 13867 Comm: syz.5.2060 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
 process_one_work+0x11f5/0x1b70 kernel/workqueue.c:3284
 process_scheduled_works kernel/workqueue.c:3346 [inline]
 bh_worker+0x5a4/0x8a0 kernel/workqueue.c:3607
 workqueue_softirq_action+0x143/0x1a0 kernel/workqueue.c:3635
 tasklet_hi_action+0x17/0x70 kernel/softirq.c:958
 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
 sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:194
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 a6 47 30 f6 48 89 df e8 8e 9b 30 f6 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 <bf> 01 00 00 00 e8 45 a6 20 f6 65 8b 05 7e a5 3b 08 85 c0 74 16 5b
RSP: 0018:ffffc90004937bc0 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffff8880324ba860 RCX: 0000000000000006
RDX: 0000000000000000 RSI: ffffffff8db032d9 RDI: ffffffff8bf1e2c0
RBP: 0000000000000293 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff90832dd7 R11: 0000000000000001 R12: ffff888021ef5900
R13: 0000000000000001 R14: 0000000000000000 R15: ffff8880324ba978
 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
 raw_event_queue_add+0x19a/0x220 drivers/usb/gadget/legacy/raw_gadget.c:84
 raw_queue_event drivers/usb/gadget/legacy/raw_gadget.c:239 [inline]
 gadget_disconnect+0x5a/0x130 drivers/usb/gadget/legacy/raw_gadget.c:387
 usb_gadget_disconnect_locked+0x20d/0x4e0 drivers/usb/gadget/udc/core.c:786
 gadget_unbind_driver+0xd7/0x4e0 drivers/usb/gadget/udc/core.c:1670
 device_remove+0xcb/0x170 drivers/base/dd.c:569
 __device_release_driver drivers/base/dd.c:1274 [inline]
 device_release_driver_internal+0x44b/0x620 drivers/base/dd.c:1297
 driver_detach+0xd8/0x1b0 drivers/base/dd.c:1360
 bus_remove_driver+0x13b/0x2c0 drivers/base/bus.c:747
 driver_unregister+0x76/0xb0 drivers/base/driver.c:277
 usb_gadget_unregister_driver+0x49/0x70 drivers/usb/gadget/udc/core.c:1736
 raw_release+0x1ae/0x2b0 drivers/usb/gadget/legacy/raw_gadget.c:462
 __fput+0x402/0xb70 fs/file_table.c:468
 task_work_run+0x150/0x240 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xec/0x130 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x426/0xfa0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9646d8eec9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd399b4348 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 0000000000098721 RCX: 00007f9646d8eec9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f9646fe7da0 R08: 0000000000000001 R09: 00000006399b463f
R10: 0000001b2da20000 R11: 0000000000000246 R12: 00007f9646fe5fac
R13: 00007f9646fe5fa0 R14: ffffffffffffffff R15: 00007ffd399b4460
 </TASK>
----------------
Code disassembly (best guess):
   0:	f5                   	cmc
   1:	53                   	push   %rbx
   2:	48 8b 74 24 10       	mov    0x10(%rsp),%rsi
   7:	48 89 fb             	mov    %rdi,%rbx
   a:	48 83 c7 18          	add    $0x18,%rdi
   e:	e8 a6 47 30 f6       	call   0xf63047b9
  13:	48 89 df             	mov    %rbx,%rdi
  16:	e8 8e 9b 30 f6       	call   0xf6309ba9
  1b:	f7 c5 00 02 00 00    	test   $0x200,%ebp
  21:	75 23                	jne    0x46
  23:	9c                   	pushf
  24:	58                   	pop    %rax
  25:	f6 c4 02             	test   $0x2,%ah
  28:	75 37                	jne    0x61
* 2a:	bf 01 00 00 00       	mov    $0x1,%edi <-- trapping instruction
  2f:	e8 45 a6 20 f6       	call   0xf620a679
  34:	65 8b 05 7e a5 3b 08 	mov    %gs:0x83ba57e(%rip),%eax        # 0x83ba5b9
  3b:	85 c0                	test   %eax,%eax
  3d:	74 16                	je     0x55
  3f:	5b                   	pop    %rbx

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/14 06:46 upstream 3a8660878839 b6605ba8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root BUG: workqueue leaked atomic, lock or RCU: syz.NUM.NUM[NUM]
2025/06/05 08:33 upstream 64980441d269 6b6b5f21 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce BUG: workqueue leaked atomic, lock or RCU: syz.NUM.NUM[NUM]
2025/07/20 05:37 upstream f4a40a4282f4 7117feec .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: workqueue leaked atomic, lock or RCU: syz.NUM.NUM[NUM]
* Struck through repros no longer work on HEAD.