Skip to content

Commit a278682

Browse files
isilenceaxboe
authored andcommitted
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>
1 parent 35efb51 commit a278682

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/io_uring.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2616,7 +2616,7 @@ static int io_sqe_buffer_register(struct io_ring_ctx *ctx, void __user *arg,
26162616

26172617
ret = io_copy_iov(ctx, &iov, arg, i);
26182618
if (ret)
2619-
break;
2619+
goto err;
26202620

26212621
/*
26222622
* Don't impose further limits on the size and buffer

0 commit comments

Comments
 (0)