]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/memmap: don't use page_address() on a highmem page
authorJens Axboe <axboe@kernel.dk>
Mon, 12 May 2025 15:06:06 +0000 (09:06 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 May 2025 15:27:41 +0000 (09:27 -0600)
commitf446c6311e86618a1f81eb576b56a6266307238f
tree0a3c08bb1ad78adaaafc9f377204e2eae1a6d7d9
parent63166b815dc163b2e46426cecf707dc5923d6d13
io_uring/memmap: don't use page_address() on a highmem page

For older/32-bit systems with highmem, don't assume that the pages in
a mapped region are always going to be mapped. If io_region_init_ptr()
finds that the pages are coalescable, also check if the first page is
a HighMem page or not. If it is, fall through to the usual vmap()
mapping rather than attempt to get the unmapped page address.

Cc: stable@vger.kernel.org
Fixes: c4d0ac1c1567 ("io_uring/memmap: optimise single folio regions")
Link: https://lore.kernel.org/all/681fe2fb.050a0220.f2294.001a.GAE@google.com/
Reported-by: syzbot+5b8c4abafcb1d791ccfc@syzkaller.appspotmail.com
Link: https://lore.kernel.org/all/681fed0a.050a0220.f2294.001c.GAE@google.com/
Reported-by: syzbot+6456a99dfdc2e78c4feb@syzkaller.appspotmail.com
Tested-by: syzbot+6456a99dfdc2e78c4feb@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/memmap.c