lkml.org 
[lkml]   [2021]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.12 695/700] io_uring: add IOPOLL and reserved field checks to IORING_OP_RENAMEAT
    Date
    From: Jens Axboe <axboe@kernel.dk>

    commit ed7eb2592286ead7d3bfdf8adf65e65392167cc4 upstream.

    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: 80a261fd0032 ("io_uring: add support for IORING_OP_RENAMEAT")
    Cc: stable@vger.kernel.org
    Reported-by: Dmitry Kadashev <dkadashev@gmail.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/io_uring.c | 4 ++++
    1 file changed, 4 insertions(+)

    --- a/fs/io_uring.c
    +++ b/fs/io_uring.c
    @@ -3497,6 +3497,10 @@ static int io_renameat_prep(struct io_ki
    struct io_rename *ren = &req->rename;
    const char __user *oldf, *newf;

    + if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL))
    + return -EINVAL;
    + if (sqe->ioprio || sqe->buf_index)
    + return -EINVAL;
    if (unlikely(req->flags & REQ_F_FIXED_FILE))
    return -EBADF;


    \
     
     \ /
      Last update: 2021-07-12 10:41    [W:4.149 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site