]> 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)
commite9d3d1fc5fb4916729d99814b3d6441cdec5cb39
tree412713127dde3057c7b037eae9bb72390ed6d17d
parentb169f7745db90eadc711e3e657516afa695c14dd
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: f739c4b60af4 ("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