diff options
author | Gabriel Krisman Bertazi <krisman@suse.de> | 2024-06-18 22:06:18 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-19 08:58:00 -0600 |
commit | 3e05b222382ec67dce7358d50b6006e91d028d8b (patch) | |
tree | 98673677d3b3af8c7cdd754fde7c11fd70c69155 /io_uring/opdef.h | |
parent | ff140cc8628abfb1755691d16cfa8788d8820ef7 (diff) | |
download | linux-3e05b222382ec67dce7358d50b6006e91d028d8b.tar.gz linux-3e05b222382ec67dce7358d50b6006e91d028d8b.tar.bz2 linux-3e05b222382ec67dce7358d50b6006e91d028d8b.zip |
io_uring: Fix probe of disabled operations
io_probe checks io_issue_def->not_supported, but we never really set
that field, as we mark non-supported functions through a specific ->prep
handler. This means we end up returning IO_URING_OP_SUPPORTED, even for
disabled operations. Fix it by just checking the prep handler itself.
Fixes: 66f4af93da57 ("io_uring: add support for probing opcodes")
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20240619020620.5301-2-krisman@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/opdef.h')
-rw-r--r-- | io_uring/opdef.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/io_uring/opdef.h b/io_uring/opdef.h index 7ee6f5aa90aa..14456436ff74 100644 --- a/io_uring/opdef.h +++ b/io_uring/opdef.h @@ -17,8 +17,6 @@ struct io_issue_def { unsigned poll_exclusive : 1; /* op supports buffer selection */ unsigned buffer_select : 1; - /* opcode is not supported by this kernel */ - unsigned not_supported : 1; /* skip auditing */ unsigned audit_skip : 1; /* supports ioprio */ @@ -47,5 +45,7 @@ struct io_cold_def { extern const struct io_issue_def io_issue_defs[]; extern const struct io_cold_def io_cold_defs[]; +bool io_uring_op_supported(u8 opcode); + void io_uring_optable_init(void); #endif |