]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd57bcc56914debd7e4827727b2ca265897a7b744
tree304aa433253eb4c6bb57eca34a895993506b5480
parent4139c20931f3bcfca4f3cbe59f9ce8390987f337
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: e790404d1245 ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c