diff options
author | Jens Axboe <axboe@kernel.dk> | 2022-03-29 10:50:03 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-03-29 10:51:08 -0600 |
commit | 9666d4206e9a14ff612e374b6b572b3efc797d46 (patch) | |
tree | 64660f26baef0bdfd3dd38e500bb7c3f2969ce1d /fs/io_uring.c | |
parent | c86d18f4aa93e0e66cda0e55827cd03eea6bc5f8 (diff) | |
download | linux-stable-9666d4206e9a14ff612e374b6b572b3efc797d46.tar.gz linux-stable-9666d4206e9a14ff612e374b6b572b3efc797d46.tar.bz2 linux-stable-9666d4206e9a14ff612e374b6b572b3efc797d46.zip |
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 <axboe@kernel.dk>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index 39a9ff31dbc5..923410937dc7 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; } |