]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix types in provided buffer ring
authorDylan Yudaken <dylany@fb.com>
Mon, 13 Jun 2022 10:11:56 +0000 (03:11 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Jun 2022 11:13:31 +0000 (05:13 -0600)
commit96b26f77ed4018387cecf5bff2945c61f99f233f
treecf78b3f306d8af65117425aeeb3f70b550d884f7
parentf84f3b9067d08317fa1cedeaf6cd78ad21439642
io_uring: fix types in provided buffer ring

The type of head needs to match that of tail in order for rollover and
comparisons to work correctly.

Without this change the comparison of tail to head might incorrectly allow
io_uring to use a buffer that userspace had not given it.

Fixes: 0bf3e064f36c ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Link: https://lore.kernel.org/r/20220613101157.3687-3-dylany@fb.com
Reviewed-by: Hao Xu <howeyxu@tencent.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c