io_uring: Fix probe of disabled operations
authorGabriel Krisman Bertazi <krisman@suse.de>
Wed, 19 Jun 2024 02:06:18 +0000 (22:06 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Jun 2024 14:58:00 +0000 (08:58 -0600)
commit3e05b222382ec67dce7358d50b6006e91d028d8b
tree98673677d3b3af8c7cdd754fde7c11fd70c69155
parentff140cc8628abfb1755691d16cfa8788d8820ef7
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>
io_uring/opdef.c
io_uring/opdef.h
io_uring/register.c