summaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorPavel Begunkov2019-05-26 11:35:47 +0200
committerJens Axboe2019-05-26 17:25:06 +0200
commita278682dad37fd2f8d2f30d8e84e376a856ab472 (patch)
treed516fbc087dd136fe61b3b29d83a658bd8ef828a /fs/io_uring.c
parentMerge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kerne... (diff)
downloadkernel-qcow2-linux-a278682dad37fd2f8d2f30d8e84e376a856ab472.tar.gz
kernel-qcow2-linux-a278682dad37fd2f8d2f30d8e84e376a856ab472.tar.xz
kernel-qcow2-linux-a278682dad37fd2f8d2f30d8e84e376a856ab472.zip
io_uring: Fix __io_uring_register() false success
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>
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 310f8d17c53e..0fbb486a320e 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2616,7 +2616,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