Commit fd670f49 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Greg Kroah-Hartman

io_uring: Fix __io_uring_register() false success

[ Upstream commit a278682d ]

If io_copy_iov() fails, it will break the loop and report success,
albeit partially completed operation.
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 84296dc6
......@@ -2506,7 +2506,7 @@ static int io_sqe_buffer_register(struct io_ring_ctx *ctx, void __user *arg,
ret = io_copy_iov(ctx, &iov, arg, i);
if (ret)
break;
goto err;
/*
* Don't impose further limits on the size and buffer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment