]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring: make io_poll_issue() sturdier
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 23 Feb 2025 17:22:31 +0000 (17:22 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 24 Feb 2025 19:11:06 +0000 (12:11 -0700)
commitc457eed55d80bc06c2c55cd5d7a4646f102db5d4
tree12c3d4f271de63bd6b4b24c9a07805c687ae85d6
parent185523ebc85342ed90c5a80034f281ac09fd29db
io_uring: make io_poll_issue() sturdier

io_poll_issue() forwards the call to io_issue_sqe() and thus inherits
some of the handling. That's not particularly failure resistant, as for
example returning an innocently looking IOU_OK from a multishot issue
will lead to severe bugs.

Reimplement io_poll_issue() without io_issue_sqe()'s request completion
logic. Remove extra checks as we know that req->file is already set,
linked timeout are armed, and iopoll is not supported. Also cover it
with warnings for now.

The patch should be useful by itself, but it's also preparing the
codebase for other future clean ups.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3096d7b1026d9a52426a598bdfc8d9d324555545.1740331076.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c