mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
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: a8edbb424b ("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>
This commit is contained in:
committed by
Jens Axboe
parent
5afb4bf9fc
commit
3a3c6d6157
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user