]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix sq array offset calculation
authorDmitry Vyukov <dvyukov@google.com>
Sat, 11 Jul 2020 09:31:11 +0000 (11:31 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 18:55:44 +0000 (12:55 -0600)
commit939674ed6d6e9760626ea79e2a34ac642621ae22
tree412713127dde3057c7b037eae9bb72390ed6d17d
parentfc116b5f2cd39a3b13be0a95b1b230beca9d15f4
io_uring: fix sq array offset calculation

rings_size() sets sq_offset to the total size of the rings (the returned
value which is used for memory allocation). This is wrong: sq array should
be located within the rings, not after them. Set sq_offset to where it
should be.

Fixes: e520227a8307 ("io_uring: allocate the two rings together")
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Acked-by: Hristo Venev <hristo@venev.name>
Cc: io-uring@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c