Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a278682d authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

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: default avatarPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 35efb51e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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