Skip to content

Commit

Permalink
io_uring: Fix __io_uring_register() false success
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed May 26, 2019
1 parent 35efb51 commit a278682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a278682

Please sign in to comment.