Skip to content
Snippets Groups Projects
Commit ee116574 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/nop: ensure nop->fd is always initialized


A previous commit added file support for nop, but it only initializes
nop->fd if IORING_NOP_FIXED_FILE is set. That check should be
IORING_NOP_FILE. Fix up the condition in nop preparation, and initialize
it to a sane value even if we're not going to be directly using it.

While in there, do the same thing for the nop->buffer field.

Reported-by: default avatar <syzbot+9a8500a45c2cabdf9577@syzkaller.appspotmail.com>
Fixes: a85f3105 ("io_uring/nop: add support for testing registered files and buffers")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f46b9cdb
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment