Files
kernel_arpi/include/uapi/linux
Jens Axboe 9e3aa61ae3 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>
2019-12-11 16:02:32 -07:00
..
2019-09-19 14:22:44 +02:00
2019-09-25 17:51:39 -07:00
2019-08-02 14:44:02 +10:00
2019-09-16 10:18:01 -04:00
2019-06-14 15:00:51 +05:30
2019-08-12 19:33:50 -07:00
2019-09-08 15:37:04 +02:00
2019-08-19 13:04:45 -07:00
2019-09-23 16:10:28 -05:00
2019-10-02 20:32:27 -06:00
2019-07-30 20:34:34 +02:00
2019-11-13 12:15:34 -08:00
2019-09-18 20:17:50 +02:00
2019-08-01 21:49:46 +02:00