Commit 1fd53673 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

io_uring: fix types for region size calulation



->nr_pages is int, it needs type extension before calculating the region
size.

Fixes: a90558b3 ("io_uring/memmap: helper for pinning region pages")
Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
[axboe: style fixup]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 819630bd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ static int io_region_pin_pages(struct io_ring_ctx *ctx,
				struct io_mapped_region *mr,
				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;
	int nr_pages;