Commit d785a77
committed
io_uring: check that we have a file table when allocating update slots
If IORING_FILE_INDEX_ALLOC is set asking for an allocated slot, the
helper doesn't check if we actually have a file table or not. The non
alloc path does do that correctly, and returns -ENXIO if we haven't set
one up.
Do the same for the allocated path, avoiding a NULL pointer dereference
when trying to find a free bit.
Fixes: a7c41b4 ("io_uring: let IORING_OP_FILES_UPDATE support choosing fixed file slots")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent bdb2c48 commit d785a77
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7973 | 7973 | | |
7974 | 7974 | | |
7975 | 7975 | | |
| 7976 | + | |
| 7977 | + | |
| 7978 | + | |
7976 | 7979 | | |
7977 | 7980 | | |
7978 | 7981 | | |
| |||
0 commit comments