From: Pavel Begunkov Date: Wed, 7 Dec 2022 03:53:27 +0000 (+0000) Subject: io_uring: improve io_double_lock_ctx fail handling X-Git-Tag: v6.1.8~833 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2c22a38fe299c4ed58aa4606fd435048c662a3a;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/4697f05afcc37df5c8f89e2fe6d9c7c19f0241f9.1670384893.git.asml.silence@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index d8aeac7..a49ccab 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);