mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
io_uring: fix types for region size calulation
[ Upstream commit1fd5367391] ->nr_pages is int, it needs type extension before calculating the region size. Fixes:a90558b36c("io_uring/memmap: helper for pinning region pages") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> [axboe: style fixup] Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ca88aca10d
commit
fe9cf295ba
@@ -135,7 +135,7 @@ static int io_region_pin_pages(struct io_ring_ctx *ctx,
|
|||||||
struct io_mapped_region *mr,
|
struct io_mapped_region *mr,
|
||||||
struct io_uring_region_desc *reg)
|
struct io_uring_region_desc *reg)
|
||||||
{
|
{
|
||||||
unsigned long size = mr->nr_pages << PAGE_SHIFT;
|
unsigned long size = (size_t) mr->nr_pages << PAGE_SHIFT;
|
||||||
struct page **pages;
|
struct page **pages;
|
||||||
int nr_pages;
|
int nr_pages;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user