]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring/uring_cmd: ensure that device supports IOPOLL
authorJens Axboe <axboe@kernel.dk>
Wed, 8 Mar 2023 16:26:13 +0000 (09:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:14 +0000 (08:50 +0100)
commit96eec931cb22209cf2744c1b5898df4ddc930f3d
tree286cee7dbcc0447efa91a4156af1b2b84e073a2c
parent94c5a7a6ded1e87c317d22fe1f7743080bb25ba2
io_uring/uring_cmd: ensure that device supports IOPOLL

commit 68147a076f02bbd61bad50e90e2a9a1edd9ca628 upstream.

It's possible for a file type to support uring commands, but not
pollable ones. Hence before issuing one of those, we should check
that it is supported and error out upfront if it isn't.

Cc: stable@vger.kernel.org
Fixes: 081b9010e6ee ("io_uring: add iopoll infrastructure for io_uring_cmd")
Link: https://github.com/axboe/liburing/issues/816
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/uring_cmd.c