summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-12-11 15:55:43 -0700
committerJens Axboe <axboe@kernel.dk>2019-12-11 16:02:32 -0700
commit9e3aa61ae3e01ce1ce6361a41ef725e1f4d1d2bf (patch)
tree69e498284ebc5e6887af645fc78a56498317282b /net
parent10d59345578a116042c1a5d737a18234aaf3e0e6 (diff)
downloadlinux-9e3aa61ae3e01ce1ce6361a41ef725e1f4d1d2bf.tar.gz
linux-9e3aa61ae3e01ce1ce6361a41ef725e1f4d1d2bf.tar.bz2
linux-9e3aa61ae3e01ce1ce6361a41ef725e1f4d1d2bf.zip
io_uring: ensure we return -EINVAL on unknown opcode
If we submit an unknown opcode and have fd == -1, io_op_needs_file() will return true as we default to needing a file. Then when we go and assign the file, we find the 'fd' invalid and return -EBADF. We really should be returning -EINVAL for that case, as we normally do for unsupported opcodes. Change io_op_needs_file() to have the following return values: 0 - does not need a file 1 - does need a file < 0 - error value and use this to pass back the right value for this invalid case. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions