syzbot


BUG: sleeping function called from invalid context in vhost_get_avail_idx

Status: fixed on 2026/05/21 07:49
Subsystems: kvm net virt
[Documentation on labels]
Reported-by: syzbot+6985cb8e543ea90ba8ee@syzkaller.appspotmail.com
Fix commit: e08a9fac5cf8 vhost_net: fix sleeping with preempt-disabled in vhost_net_busy_poll()
First crash: 65d, last: 65d
✨ AI Jobs (1)
ID Workflow Result Correct Bug Created Started Finished Revision Error
9334e488-b837-4e8b-ae74-a493f3e81729 assessment-security 💥 BUG: sleeping function called from invalid context in vhost_get_avail_idx 2026/05/14 14:34 2026/05/14 14:34 2026/05/14 14:36 6ccb967e465e832a7bfd7a116ad00d52a0923a5d
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/ee7e3c0f7235af18ea...
truncated to first 200 bytes; open job for full error
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net v1] vhost_net: fix sleeping with preempt-disabled in vhost_net_busy_poll() 3 (3) 2026/04/23 19:10
[syzbot] [kvm?] [net?] [virt?] BUG: sleeping function called from invalid context in vhost_get_avail_idx 4 (7) 2026/04/22 00:36
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 BUG: sleeping function called from invalid context in vhost_get_avail_idx origin:upstream 5 C error 3 249d 249d 0/3 upstream: reported C repro on 2025/10/16 01:54
Last patch testing requests (2)
Created Duration User Patch Repo Result
2026/04/21 23:36 32m kohei@enjuk.jp patch upstream OK log
2026/04/21 17:11 22m kohei@enjuk.jp patch upstream error

Sample crash report:
BUG: sleeping function called from invalid context at drivers/vhost/vhost.c:1527
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6110, name: vhost-6109
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
2 locks held by vhost-6109/6110:
 #0: ffff888055624cb0 (&vq->mutex/1){+.+.}-{4:4}, at: handle_tx+0x2d/0x160 drivers/vhost/net.c:971
 #1: ffff888055620248 (&vq->mutex){+.+.}-{4:4}, at: vhost_net_busy_poll+0x9c/0x730 drivers/vhost/net.c:554
Preemption disabled at:
[<ffffffff88f1a006>] vhost_net_busy_poll+0x1c6/0x730 drivers/vhost/net.c:563
CPU: 0 UID: 0 PID: 6110 Comm: vhost-6109 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
 <TASK>
 __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:9162
 __might_fault+0x8b/0x140 mm/memory.c:7322
 vhost_get_avail_idx+0x31c/0x4f0 drivers/vhost/vhost.c:1527
 vhost_vq_avail_empty drivers/vhost/vhost.c:3206 [inline]
 vhost_vq_avail_empty+0xa9/0xe0 drivers/vhost/vhost.c:3199
 vhost_net_busy_poll+0x297/0x730 drivers/vhost/net.c:574
 vhost_net_tx_get_vq_desc drivers/vhost/net.c:610 [inline]
 get_tx_bufs.constprop.0+0x338/0x600 drivers/vhost/net.c:650
 handle_tx_copy+0x28c/0x12e0 drivers/vhost/net.c:778
 handle_tx+0x139/0x160 drivers/vhost/net.c:985
 vhost_run_work_list+0x183/0x220 drivers/vhost/vhost.c:454
 vhost_task_fn+0x156/0x430 kernel/vhost_task.c:49
 ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/18 13:30 upstream 8541d8f725c6 5be7a9de .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream BUG: sleeping function called from invalid context in vhost_get_avail_idx
* Struck through repros no longer work on HEAD.