diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-06-24 14:40:34 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-06-24 20:50:59 -0600 |
| commit | 3a3c6d61577dbb23c09df3e21f6f9eda1ecd634b (patch) | |
| tree | a06519191c7d9638f3f55a46f9f57dc9eac58df8 /io_uring/rsrc.h | |
| parent | 5afb4bf9fc62d828647647ec31745083637132e4 (diff) | |
io_uring/rsrc: don't rely on user vaddr alignment
There is no guaranteed alignment for user pointers, however the
calculation of an offset of the first page into a folio after coalescing
uses some weird bit mask logic, get rid of it.
Cc: stable@vger.kernel.org
Reported-by: David Hildenbrand <david@redhat.com>
Fixes: a8edbb424b139 ("io_uring/rsrc: enable multi-hugepage buffer coalescing")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/io-uring/e387b4c78b33f231105a601d84eefd8301f57954.1750771718.git.asml.silence@gmail.com/
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.h')
| -rw-r--r-- | io_uring/rsrc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h index 0d2138f16322..25e7e998dcfd 100644 --- a/io_uring/rsrc.h +++ b/io_uring/rsrc.h @@ -49,6 +49,7 @@ struct io_imu_folio_data { unsigned int nr_pages_mid; unsigned int folio_shift; unsigned int nr_folios; + unsigned long first_folio_page_idx; }; bool io_rsrc_cache_init(struct io_ring_ctx *ctx); |