summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2025-11-05 15:47:01 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-11-13 15:37:44 -0500
commitfe9cf295ba305a594c652302520e1ec22374c45b (patch)
tree7b0ecd80264bdbd24ddbb79f1b20f2a0cea56203 /io_uring
parentca88aca10d44a5ace402c7473b64428036352bba (diff)
downloadlinux-fe9cf295ba305a594c652302520e1ec22374c45b.tar.gz
linux-fe9cf295ba305a594c652302520e1ec22374c45b.tar.bz2
linux-fe9cf295ba305a594c652302520e1ec22374c45b.zip
io_uring: fix types for region size calulation
[ Upstream commit 1fd5367391bf0eeb09e624c4ab45121b54eaab96 ] ->nr_pages is int, it needs type extension before calculating the region size. Fixes: a90558b36ccee ("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>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/memmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/memmap.c b/io_uring/memmap.c
index 2e99dffddfc5..add03ca75cb9 100644
--- a/io_uring/memmap.c
+++ b/io_uring/memmap.c
@@ -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;