* [PATCH 1/1] io_uring: Fix __io_uring_register() false success
@ 2019-05-26 9:35 Pavel Begunkov (Silence)
2019-05-26 15:25 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Begunkov (Silence) @ 2019-05-26 9:35 UTC (permalink / raw)
To: Jens Axboe, Alexander Viro, linux-block, linux-fsdevel, linux-kernel
Cc: Pavel Begunkov
From: Pavel Begunkov <asml.silence@gmail.com>
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>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] io_uring: Fix __io_uring_register() false success
2019-05-26 9:35 [PATCH 1/1] io_uring: Fix __io_uring_register() false success Pavel Begunkov (Silence)
@ 2019-05-26 15:25 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2019-05-26 15:25 UTC (permalink / raw)
To: Pavel Begunkov (Silence),
Alexander Viro, linux-block, linux-fsdevel, linux-kernel
On 5/26/19 3:35 AM, Pavel Begunkov (Silence) wrote:
> From: Pavel Begunkov <asml.silence@gmail.com>
>
> If io_copy_iov() fails, it will break the loop and report success,
> albeit partially completed operation.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-26 15:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-26 9:35 [PATCH 1/1] io_uring: Fix __io_uring_register() false success Pavel Begunkov (Silence)
2019-05-26 15:25 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).