Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
io_uring: add need_resched() check in inner poll loop
The outer poll loop checks for whether we need to reschedule, and returns to userspace if we do. However, it's possible to get stuck in the inner loop as well, if the CPU we are running on needs to reschedule to finish the IO work. Add the need_resched() check in the inner loop as well. This fixes a potential hang if the kernel is configured with CONFIG_PREEMPT_VOLUNTARY=y. Reported-by: Sagi Grimberg <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Tested-by: Sagi Grimberg <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information