BUG: sleeping function called from invalid context in mmc_free_host

Status: upstream: reported C repro on 2026/08/04 22:46
Reported-by: syzbot+48dcddd9870cdc33faee@syzkaller.appspotmail.com
First crash: 4d14h, last: 3h40m
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream BUG: sleeping function called from invalid context in mmc_free_host mmc mm prio:high 5 syz, C error 30 2d04h 3d14h 0/29 upstream: reported C repro on 2026/08/05 22:45

Sample crash report:
BUG: sleeping function called from invalid context at kernel/workqueue.c:3414
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 0, name: swapper/1
preempt_count: 101, expected: 0
RCU nest depth: 0, expected: 0
1 lock held by swapper/1/0:
 #0: ffffc900001f0be0 ((&vub300->inactivity_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd2/0x540 kernel/time/timer.c:1698
Preemption disabled at:
[<0000000000000000>] 0x0
CPU: 1 PID: 0 Comm: swapper/1 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <IRQ>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 __might_resched+0x48d/0x5f0 kernel/sched/core.c:10212
 start_flush_work kernel/workqueue.c:3414 [inline]
 __flush_work+0x10f/0xac0 kernel/workqueue.c:3474
 __cancel_work_timer+0x3f8/0x560 kernel/workqueue.c:3562
 mmc_free_host+0x19/0x30 drivers/mmc/core/host.c:694
 call_timer_fn+0x189/0x540 kernel/time/timer.c:1701
 expire_timers kernel/time/timer.c:1752 [inline]
 __run_timers+0x570/0x810 kernel/time/timer.c:2023
 run_timer_softirq+0x67/0xf0 kernel/time/timer.c:2036
 handle_softirqs+0x27d/0x820 kernel/softirq.c:578
 __do_softirq kernel/softirq.c:612 [inline]
 invoke_softirq kernel/softirq.c:452 [inline]
 __irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661
 irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
 sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:pv_native_safe_halt+0xf/0x10 arch/x86/kernel/paravirt.c:148
Code: 4e 1c 02 c3 cc cc cc cc cc cc cc f3 0f 1e fa 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 66 90 0f 00 2d a3 5a 3b 00 fb f4 <c3> 66 0f 1f 00 55 41 57 41 56 41 54 53 50 8b 2f eb 2c 89 cb 80 f9
RSP: 0018:ffffc90000187de0 EFLAGS: 000002c2
RAX: 00544fa8e5928900 RBX: ffffffff81630d54 RCX: 00544fa8e5928900
RDX: 0000000000000001 RSI: ffffffff8acacbe0 RDI: ffffffff8b1d0ca0
RBP: ffffc90000187f20 R08: ffff8880b8f36bab R09: 1ffff110171e6d75
R10: dffffc0000000000 R11: ffffed10171e6d76 R12: 1ffff92000030fc8
R13: dffffc0000000000 R14: 1ffff110036ce780 R15: 0000000000000000
 arch_safe_halt arch/x86/include/asm/paravirt.h:108 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:753
 default_idle_call+0x6c/0xa0 kernel/sched/idle.c:97
 cpuidle_idle_call kernel/sched/idle.c:178 [inline]
 do_idle+0x334/0x5c0 kernel/sched/idle.c:302
 cpu_startup_entry+0x43/0x60 kernel/sched/idle.c:401
 start_secondary+0xee/0xf0 arch/x86/kernel/smpboot.c:323
 secondary_startup_64_no_verify+0x179/0x17b
 </TASK>
ODEBUG: object ffffc900001f09c0 is NOT on stack ffffc90000180000, but annotated.

======================================================
----------------
Code disassembly (best guess):
   0:	4e 1c 02             	rex.WRX sbb $0x2,%al
   3:	c3                   	ret
   4:	cc                   	int3
   5:	cc                   	int3
   6:	cc                   	int3
   7:	cc                   	int3
   8:	cc                   	int3
   9:	cc                   	int3
   a:	cc                   	int3
   b:	f3 0f 1e fa          	endbr64
   f:	0f 0b                	ud2
  11:	66 2e 0f 1f 84 00 00 	cs nopw 0x0(%rax,%rax,1)
  18:	00 00 00
  1b:	f3 0f 1e fa          	endbr64
  1f:	66 90                	xchg   %ax,%ax
  21:	0f 00 2d a3 5a 3b 00 	verw   0x3b5aa3(%rip)        # 0x3b5acb
  28:	fb                   	sti
  29:	f4                   	hlt
* 2a:	c3                   	ret <-- trapping instruction
  2b:	66 0f 1f 00          	nopw   (%rax)
  2f:	55                   	push   %rbp
  30:	41 57                	push   %r15
  32:	41 56                	push   %r14
  34:	41 54                	push   %r12
  36:	53                   	push   %rbx
  37:	50                   	push   %rax
  38:	8b 2f                	mov    (%rdi),%ebp
  3a:	eb 2c                	jmp    0x68
  3c:	89 cb                	mov    %ecx,%ebx
  3e:	80                   	.byte 0x80
  3f:	f9                   	stc

Crashes (7):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/09 09:08 linux-6.6.y 6436c12a2ced 5d63f80b .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
2026/08/05 06:08 linux-6.6.y aa0e49877a2e 52aa2820 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
2026/08/05 06:08 linux-6.6.y aa0e49877a2e 52aa2820 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
2026/08/05 01:13 linux-6.6.y aa0e49877a2e d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
2026/08/04 23:58 linux-6.6.y aa0e49877a2e d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
2026/08/04 22:47 linux-6.6.y aa0e49877a2e d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
2026/08/04 22:45 linux-6.6.y aa0e49877a2e d4abbeac .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan BUG: sleeping function called from invalid context in mmc_free_host
* Struck through repros no longer work on HEAD.