Re: [syzbot] [kvm?] [net?] [virt?] BUG: sleeping function called from invalid context in vhost_get_avail_idx

From: Kohei Enju

Date: Tue Apr 21 2026 - 20:37:20 EST


On 04/21 16:54, Michael S. Tsirkin wrote:
> >
> > #syz test
> >
> > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> > index 80965181920c..c6536cad9c4f 100644
> > --- a/drivers/vhost/net.c
> > +++ b/drivers/vhost/net.c
> > @@ -560,7 +560,7 @@ static void vhost_net_busy_poll(struct vhost_net *net,
> > busyloop_timeout = poll_rx ? rvq->busyloop_timeout:
> > tvq->busyloop_timeout;
> >
> > - preempt_disable();
> > + migrate_disable();
> > endtime = busy_clock() + busyloop_timeout;
> >
> > while (vhost_can_busy_poll(endtime)) {
> > @@ -577,7 +577,7 @@ static void vhost_net_busy_poll(struct vhost_net *net,
> > cpu_relax();
> > }
> >
> > - preempt_enable();
> > + migrate_enable();
> >
> > if (poll_rx || sock_has_rx_data(sock))
> > vhost_net_busy_poll_try_queue(net, vq);
>
>
>
> Makes sense but this stipped up the bot. Try again?

Hi Michael,

Thanks for taking a look.
I've retried the testing, and it looks good.
https://lore.kernel.org/all/69e8119f.a00a0220.17a17.001e.GAE@xxxxxxxxxx/

Will send an official patch.