]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/umem: Fix truncation for block sizes >= 4G
authorJason Gunthorpe <jgg@nvidia.com>
Mon, 1 Jun 2026 16:52:31 +0000 (13:52 -0300)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 3 Jun 2026 12:37:34 +0000 (09:37 -0300)
commit15fe76e23615f502d051ef0768f86babaf08746c
tree477660e80ff29ee604d3f278b4d6289502911c9d
parentb230b57bd6f242aaac3b8e62c7d18c69e1e30392
RDMA/umem: Fix truncation for block sizes >= 4G

When the iommu is used the linearization of the mapping can give a single
block that is very large split across multiple SG entries.

When __rdma_block_iter_next() reassembles the split SG entries it is
overflowing the 32 bit stack values and computed the wrong DMA addresses
for blocks after the truncation.

Use the right types to hold DMA addresses.

Link: https://patch.msgid.link/r/1-v1-88303e9e509f+f7-ib_umem_types_jgg@nvidia.com
Cc: stable@vger.kernel.org
Fixes: a808273a495c ("RDMA/verbs: Add a DMA iterator to return aligned contiguous memory blocks")
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/iter.c