Skip to contentSkip to conversation

io_uring: Fix __io_uring_register() false success

PATCH Applied Pavel Begunkov (Silence) 2 participants 2 messages May 26, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 io_uring: Fix __io_uring_register() false success

From: Pavel Begunkov <[email protected]>

If io_copy_iov() fails, it will break the loop and report success, albeit partially completed operation.

---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/io_uring.c +1 -1
index 310f8d17c53e..0fbb486a320e 100644
@@ -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
Signature · 1 line
2.21.0
maintainer Applied
#1 lore raw
Quoted 4 lines · Pavel Begunkov (Silence)

From: Pavel Begunkov <[email protected]>

If io_copy_iov() fails, it will break the loop and report success, albeit partially completed operation.

Thanks, applied.

Signature · 1 line
Jens Axboe