diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c14c42b95ab8..ae66278e4dcf 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -222,6 +222,8 @@ static int vhost_worker(void *data) if (work) { __set_current_state(TASK_RUNNING); work->fn(work); + if (need_resched()) + schedule(); } else schedule();