-
Jens Axboe authored
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:
<syzbot+9a8500a45c2cabdf9577@syzkaller.appspotmail.com> Fixes: a85f3105 ("io_uring/nop: add support for testing registered files and buffers") Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Jens Axboe authoredA 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:
<syzbot+9a8500a45c2cabdf9577@syzkaller.appspotmail.com> Fixes: a85f3105 ("io_uring/nop: add support for testing registered files and buffers") Signed-off-by:
Jens Axboe <axboe@kernel.dk>