]> 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)
commit70720aee0ab936490894e0b6c94d207a8c408d00
tree304aa433253eb4c6bb57eca34a895993506b5480
parent219de6a380eab7ceadf6ee58c19496104ffe2bba
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: 0bf3e064f36c ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c