From: Pavel Begunkov Date: Sun, 26 May 2019 09:35:47 +0000 (+0300) Subject: io_uring: Fix __io_uring_register() false success X-Git-Tag: v5.4-rc1~579^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a278682dad37fd2f8d2f30d8e84e376a856ab472;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Jens Axboe --- diff --git a/fs/io_uring.c b/fs/io_uring.c index 310f8d1..0fbb486 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