From: Jens Axboe Date: Tue, 29 Mar 2022 16:50:03 +0000 (-0600) Subject: io_uring: fail links if msg-ring doesn't succeeed X-Git-Tag: v5.18-rc1~22^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9666d4206e9a14ff612e374b6b572b3efc797d46;p=thirdparty%2Fkernel%2Flinux.git io_uring: fail links if msg-ring doesn't succeeed We must always call req_set_fail() if the request is failed, otherwise we won't sever links for dependent chains correctly. Fixes: 4f57f06ce218 ("io_uring: add support for IORING_OP_MSG_RING command") Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 39a9ff31dbc56..923410937dc72 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -4500,6 +4500,8 @@ static int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags) ret = 0; } + if (ret < 0) + req_set_fail(req); __io_req_complete(req, issue_flags, ret, 0); return 0; }