public inbox for [email protected]
 help / color / mirror / Atom feed
* [RFC] do_iopoll() and *grab_env()
@ 2020-06-11 15:54 Pavel Begunkov
  2020-06-12 17:02 ` Jens Axboe
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Begunkov @ 2020-06-11 15:54 UTC (permalink / raw)
  To: io-uring, Jens Axboe

io_do_iopoll() can async punt a request with io_queue_async_work(),
so doing io_req_work_grab_env(). The problem is that iopoll() can
be called from who knows what context, e.g. from a completely
different process with its own memory space, creds, etc.

io_do_iopoll() {
	ret = req->poll();
	if (ret == -EAGAIN)
		io_queue_async_work()
	...
}


I can't find it handled in io_uring. Can this even happen?
Wouldn't it be better to complete them with -EAGAIN?

-- 
Pavel Begunkov

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-13 19:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-11 15:54 [RFC] do_iopoll() and *grab_env() Pavel Begunkov
2020-06-12 17:02 ` Jens Axboe
2020-06-12 17:30   ` Pavel Begunkov
2020-06-12 17:55     ` Jens Axboe
2020-06-12 18:02       ` Jens Axboe
2020-06-12 18:33         ` Pavel Begunkov
2020-06-12 18:46           ` Pavel Begunkov
2020-06-12 19:42           ` Jens Axboe
2020-06-13 19:12             ` Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox