[SRU][J/N][PATCH 0/1] Fix warning at iommu_dma_unmap_page when running ibv_rc_pingpong
Jacob Martin
jacob.martin at canonical.com
Tue Jul 8 22:22:09 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2107816
SRU Justification:
[Impact]
On systems with ConnectX devices using the mlx5_ib driver, the dereg_mr
InfiniBand operation will produce a kernel WARNING message when
deregistering device memory. The WARNING occurs only when an IOMMU is
in-use and not in passthrough/identity mode, but in this case the
mlx5_ib driver is still behaving incorrectly.
[ 343.588824] ------------[ cut here ]------------
[ 343.588829] WARNING: CPU: 68 PID: 4076 at drivers/iommu/dma-iommu.c:1198 iommu_dma_unmap_page+0x12c/0x190
...
[ 343.589101] Call trace:
[ 343.589102] iommu_dma_unmap_page+0x12c/0x190
[ 343.589104] dma_unmap_page_attrs+0x1f8/0x290
[ 343.589107] mlx5_free_priv_descs+0x94/0xe0 [mlx5_ib]
[ 343.589121] mlx5_ib_dereg_mr+0x330/0x4f8 [mlx5_ib]
[ 343.589131] ib_dereg_mr_user+0x54/0x178 [ib_core]
[ 343.589148] uverbs_free_mr+0x24/0x50 [ib_uverbs]
[ 343.589155] destroy_hw_idr_uobject+0x38/0x98 [ib_uverbs]
[ 343.589160] uverbs_destroy_uobject+0x4c/0x230 [ib_uverbs]
[ 343.589165] uobj_destroy+0x60/0xe8 [ib_uverbs]
[ 343.589170] ib_uverbs_run_method+0x194/0x310 [ib_uverbs]
[ 343.589175] ib_uverbs_cmd_verbs+0x1ac/0x288 [ib_uverbs]
[ 343.589180] ib_uverbs_ioctl+0xb0/0x150 [ib_uverbs]
[ 343.589185] __arm64_sys_ioctl+0xd0/0x150
[ 343.589189] invoke_syscall.constprop.0+0x84/0x100
[ 343.589191] do_el0_svc+0x4c/0x100
[ 343.589192] el0_svc+0x48/0x1c8
[ 343.589195] el0t_64_sync_handler+0x148/0x158
[ 343.589197] el0t_64_sync+0x1b0/0x1b8
[ 343.589199] ---[ end trace 0000000000000000 ]---
Oracular obtained the fix via stable updates, and 6.14 kernels and newer
already have this fix.
Jammy and Noble are still affected.
[Fix]
This is resolved by backporting abc7b3f1f056 ("RDMA/mlx5: Fix a WARN
during dereg_mr for DM type") from upstream. The patch submitted with
this cover letter was originally submitted to noble:linux-nvidia, but
benefits jammy:linux and noble:linux as well.
[Test Plan]
For systems with ConnectX devices configured for InfiniBand, this can be
reproduced with:
$ ibv_rc_pingpong -g 0 -j &
$ ibv_rc_pingpong -g 0 -j 127.0.0.1
Finally, check dmesg for a WARNING message.
[Where issues could arise]
These changes affect the mlx5_ib driver. Regressions would likely appear
as misbehavior of this driver, particularly where it handles releasing
RDMA/IB memory regions.
Yishai Hadas (1):
RDMA/mlx5: Fix a WARN during dereg_mr for DM type
drivers/infiniband/hw/mlx5/mr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.43.0
More information about the kernel-team
mailing list