diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-12-07 03:53:27 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-12-31 13:26:53 +0100 |
commit | 72750cf68d58fa08e301833fb73cef5e8d97004b (patch) | |
tree | 5f0164f357b976843f25118eeb97b504af5ab8a9 | |
parent | 4ffd5d0a7b105bedac1f50e33e6019b18331bdc8 (diff) |
io_uring: improve io_double_lock_ctx fail handling
commit 4c979eaefa4356d385b7c7d2877dc04d7fe88969 upstream.
msg_ring will fail the request if it can't lock rings, instead punt it
to io-wq as was originally intended.
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/4697f05afcc37df5c8f89e2fe6d9c7c19f0241f9.1670384893.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | io_uring/msg_ring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index 90d2fc6fd80e..080867143f28 100644 --- a/io_uring/msg_ring.c +++ b/io_uring/msg_ring.c @@ -164,6 +164,8 @@ int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags) } done: + if (ret == -EAGAIN) + return -EAGAIN; if (ret < 0) req_set_fail(req); io_req_set_res(req, ret, 0); |