]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RDMA/rtrs-srv: fix SG mapping
authorRoman Penyaev <r.peniaev@gmail.com>
Wed, 7 Jan 2026 16:15:08 +0000 (17:15 +0100)
committerLeon Romanovsky <leon@kernel.org>
Tue, 13 Jan 2026 13:01:13 +0000 (08:01 -0500)
commit83835f7c07b523c7ca2a5ad0a511670b5810539e
treec17064c5ca7e10f195bb5f0490333122ae7416df
parent325e3b5431ddd27c5f93156b36838a351e3b2f72
RDMA/rtrs-srv: fix SG mapping

This fixes the following error on the server side:

   RTRS server session allocation failed: -EINVAL

caused by the caller of the `ib_dma_map_sg()`, which does not expect
less mapped entries, than requested, which is in the order of things
and can be easily reproduced on the machine with enabled IOMMU.

The fix is to treat any positive number of mapped sg entries as a
successful mapping and cache DMA addresses by traversing modified
SG table.

Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality")
Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Grzegorz Prajsner <grzegorz.prajsner@ionos.com>
Link: https://patch.msgid.link/20260107161517.56357-2-haris.iqbal@ionos.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/ulp/rtrs/rtrs-srv.c