summaryrefslogtreecommitdiff
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2019-05-26 12:35:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-06-22 08:09:10 +0200
commitfd670f49dd3054679d35f7da5ec9f31619f16dd0 (patch)
tree35413dfbb72065ce31aa401e5ace0992ed2c695d /fs/io_uring.c
parent84296dc648061f565ca99676aab575dd465c6d3c (diff)
io_uring: Fix __io_uring_register() false success
[ Upstream commit a278682dad37fd2f8d2f30d8e84e376a856ab472 ] If io_copy_iov() fails, it will break the loop and report success, albeit partially completed operation. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/io_uring.c')
-rw-r--r--fs/io_uring.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 4e32a033394c..e82adbf8adc1 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -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