Jens Axboe ee116574de 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: syzbot+9a8500a45c2cabdf9577@syzkaller.appspotmail.com
Fixes: a85f31052bce ("io_uring/nop: add support for testing registered files and buffers")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-11-21 07:15:30 -07:00
..
2024-11-21 07:11:00 -07:00
2024-11-21 07:11:00 -07:00
2024-09-16 13:29:00 +02:00
2024-11-15 09:55:54 -07:00
2024-06-19 07:57:21 -06:00
2022-07-24 18:39:11 -06:00
2024-11-18 09:10:56 -07:00
2024-02-09 09:04:39 -07:00
2024-02-09 09:04:39 -07:00