Kernel bug: BUG: sleeping function called from invalid context in usb_tx_block
Subsystem: usb, libertas
Status: fixed

Crash report:
usb8xxx: URB in failure status: -2
BUG: sleeping function called from invalid context at drivers/usb/core/urb.c:705
in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1
preempt_count: 101, expected: 0
RCU nest depth: 0, expected: 0
no locks held by swapper/1/0.
irq event stamp: 298277
hardirqs last  enabled at (298276): [<ffffffff876c80e2>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:178 [inline]
hardirqs last  enabled at (298276): [<ffffffff876c80e2>] _raw_spin_unlock_irqrestore+0x52/0x80 kernel/locking/spinlock.c:194
hardirqs last disabled at (298277): [<ffffffff876c7df2>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:130 [inline]
hardirqs last disabled at (298277): [<ffffffff876c7df2>] _raw_spin_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:162
softirqs last  enabled at (298266): [<ffffffff8177002d>] __do_softirq kernel/softirq.c:656 [inline]
softirqs last  enabled at (298266): [<ffffffff8177002d>] invoke_softirq kernel/softirq.c:496 [inline]
softirqs last  enabled at (298266): [<ffffffff8177002d>] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
softirqs last disabled at (298273): [<ffffffff8177002d>] __do_softirq kernel/softirq.c:656 [inline]
softirqs last disabled at (298273): [<ffffffff8177002d>] invoke_softirq kernel/softirq.c:496 [inline]
softirqs last disabled at (298273): [<ffffffff8177002d>] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 __might_resched.cold+0x1ec/0x232 kernel/sched/core.c:8888
 usb_kill_urb+0x8e/0x320 drivers/usb/core/urb.c:705
 usb_tx_block+0x91/0x320 drivers/net/wireless/marvell/libertas/if_usb.c:429
 if_usb_send_fw_pkt.isra.0+0x2e4/0x550 drivers/net/wireless/marvell/libertas/if_usb.c:366
 if_usb_receive_fwload+0x5d3/0x780 drivers/net/wireless/marvell/libertas/if_usb.c:592
 __usb_hcd_giveback_urb+0x38d/0x610 drivers/usb/core/hcd.c:1657
 usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
 dummy_timer+0xda1/0x36c0 drivers/usb/gadget/udc/dummy_hcd.c:2005
 __run_hrtimer kernel/time/hrtimer.c:1785 [inline]
 __hrtimer_run_queues+0x50e/0xa70 kernel/time/hrtimer.c:1849
 hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1866
 handle_softirqs+0x1de/0x9d0 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
 sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1056
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:pv_native_safe_halt+0xf/0x20 arch/x86/kernel/paravirt.c:63
Code: ce b0 01 e9 53 e8 02 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 33 87 1c 00 fb f4 <c3> cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
RSP: 0018:ffffc9000013fe00 EFLAGS: 00000242
RAX: 0000000000048d1f RBX: ffff8881022d9d80 RCX: ffffffff8769f8d5
RDX: 0000000000000000 RSI: ffffffff89024e74 RDI: ffffffff87afd320
RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed103eae672d
R10: ffff8881f573396b R11: 0000000000000000 R12: 0000000000000001
R13: ffffed102045b3b0 R14: 0000000000000001 R15: ffffffff8af01fd0
 arch_safe_halt arch/x86/include/asm/paravirt.h:73 [inline]
 default_idle+0x9/0x10 arch/x86/kernel/process.c:767
 default_idle_call+0x6c/0xb0 kernel/sched/idle.c:122
 cpuidle_idle_call kernel/sched/idle.c:199 [inline]
 do_idle+0x464/0x590 kernel/sched/idle.c:352
 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:451
 start_secondary+0x21d/0x2d0 arch/x86/kernel/smpboot.c:312
 common_startup_64+0x13e/0x148
 </TASK>
BUG: scheduling while atomic: swapper/1/0/0x00000102
no locks held by swapper/1/0.
Modules linked in:
irq event stamp: 298277
hardirqs last  enabled at (298276): [<ffffffff876c80e2>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:178 [inline]
hardirqs last  enabled at (298276): [<ffffffff876c80e2>] _raw_spin_unlock_irqrestore+0x52/0x80 kernel/locking/spinlock.c:194
hardirqs last disabled at (298277): [<ffffffff876c7df2>] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:130 [inline]
hardirqs last disabled at (298277): [<ffffffff876c7df2>] _raw_spin_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:162
softirqs last  enabled at (298266): [<ffffffff8177002d>] __do_softirq kernel/softirq.c:656 [inline]
softirqs last  enabled at (298266): [<ffffffff8177002d>] invoke_softirq kernel/softirq.c:496 [inline]
softirqs last  enabled at (298266): [<ffffffff8177002d>] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
softirqs last disabled at (298273): [<ffffffff8177002d>] __do_softirq kernel/softirq.c:656 [inline]
softirqs last disabled at (298273): [<ffffffff8177002d>] invoke_softirq kernel/softirq.c:496 [inline]
softirqs last disabled at (298273): [<ffffffff8177002d>] __irq_exit_rcu+0xed/0x150 kernel/softirq.c:723
Preemption disabled at:
[<0000000000000000>] 0x0
----------------
Code disassembly (best guess), 1 bytes skipped:
   0:	b0 01                	mov    $0x1,%al
   2:	e9 53 e8 02 00       	jmp    0x2e85a
   7:	0f 1f 00             	nopl   (%rax)
   a:	90                   	nop
   b:	90                   	nop
   c:	90                   	nop
   d:	90                   	nop
   e:	90                   	nop
   f:	90                   	nop
  10:	90                   	nop
  11:	90                   	nop
  12:	90                   	nop
  13:	90                   	nop
  14:	90                   	nop
  15:	90                   	nop
  16:	90                   	nop
  17:	90                   	nop
  18:	90                   	nop
  19:	90                   	nop
  1a:	f3 0f 1e fa          	endbr64
  1e:	66 90                	xchg   %ax,%ax
  20:	0f 00 2d 33 87 1c 00 	verw   0x1c8733(%rip)        # 0x1c875a
  27:	fb                   	sti
  28:	f4                   	hlt
* 29:	c3                   	ret <-- trapping instruction
  2a:	cc                   	int3
  2b:	cc                   	int3
  2c:	cc                   	int3
  2d:	cc                   	int3
  2e:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
  35:	00 00 00
  38:	66 90                	xchg   %ax,%ax
  3a:	90                   	nop
  3b:	90                   	nop
  3c:	90                   	nop
  3d:	90                   	nop
  3e:	90                   	nop