io_uring: disallow mixed provided buffer group registrations
authorJens Axboe <axboe@kernel.dk>
Wed, 18 May 2022 21:34:37 +0000 (15:34 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 May 2022 22:21:30 +0000 (16:21 -0600)
commit2fcabce2d7d34f69a888146dab15b36a917f09d4
tree304aa433253eb4c6bb57eca34a895993506b5480
parent1d0dbbfa282d9be57792e3b5827dc57b010181ee
io_uring: disallow mixed provided buffer group registrations

It's nonsensical to register a provided buffer ring, if a classic
provided buffer group with the same ID exists. Depending on the order of
which we decide what type to pick, the other type will never get used.
Explicitly disallow it and return an error if this is attempted.

Fixes: c7fb19428d67 ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c