Jens Axboe <axboe@xxxxxxxxx> writes: > > I mentioned this in our out-of-band discussions on this patch set, and > we cannot call napi_busy_loop() under rcu_read_lock() if loop_end and > loop_end_arg is set AND loop_end() doesn't always return true. Because > otherwise we can end up with napi_busy_loop() doing: > > if (unlikely(need_resched())) { > if (napi_poll) > busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget); > preempt_enable(); > rcu_read_unlock(); > cond_resched(); > if (loop_end(loop_end_arg, start_time)) > return; > goto restart; > } > > and hence we're now scheduling with rcu read locking disabled. So we > need to handle that case appropriately as well. I'll have a look.