Skip to content

Commit ed7eb25

Browse files
committed
io_uring: add IOPOLL and reserved field checks to IORING_OP_RENAMEAT
We can't support IOPOLL with non-pollable request types, and we should check for unused/reserved fields like we do for other request types. Fixes: 80a261f ("io_uring: add support for IORING_OP_RENAMEAT") Cc: [email protected] Reported-by: Dmitry Kadashev <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 12dcb58 commit ed7eb25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/io_uring.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3463,6 +3463,10 @@ static int io_renameat_prep(struct io_kiocb *req,
34633463
struct io_rename *ren = &req->rename;
34643464
const char __user *oldf, *newf;
34653465

3466+
if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
3467+
return -EINVAL;
3468+
if (sqe->ioprio || sqe->buf_index)
3469+
return -EINVAL;
34663470
if (unlikely(req->flags & REQ_F_FIXED_FILE))
34673471
return -EBADF;
34683472

0 commit comments

Comments
 (0)