]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - fs/io_uring.c
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)
commitb36200f543ff07a1cb346aa582349141df2c8068
tree412713127dde3057c7b037eae9bb72390ed6d17d
parent760618f7a8e3b63aa06266efb301719c374e29d4
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: 75b28affdd6a ("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