Commit 2e8a4689 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Akilesh Kailash
Browse files

BACKPORT: 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.

Bug: 450109138
Bug: 297114355
(cherry picked from commit c457eed5)
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3096d7b1026d9a52426a598bdfc8d9d324555545.1740331076.git.asml.silence@gmail.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
[akailash@: Fix merge conflict in io_issue_sqe()]
Cherrypick-From: https://android-review.googlesource.com/q/commit:00cb3683ede5a964af71c581cffd7ad4fc76681e


Merged-In: I438c2aaa0978c99c78ca3a52b1f29a5348e35f74
Change-Id: I438c2aaa0978c99c78ca3a52b1f29a5348e35f74
Signed-off-by: default avatarAkilesh Kailash <akailash@google.com>
parent 94890078
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment