]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net/rds: dma_map_sg is entitled to merge entries
authorGerd Rausch <gerd.rausch@oracle.com>
Tue, 17 Aug 2021 17:04:37 +0000 (10:04 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 09:58:42 +0000 (11:58 +0200)
commit07e30b2c7077439930b9db59e02b15f86fdc9bf2
tree551da3ae7a42238041b1da0f16d85500631f014e
parentc9a3ca5db7590bcd3bfc5942273c27ea5f9dade6
net/rds: dma_map_sg is entitled to merge entries

BugLink: https://bugs.launchpad.net/bugs/1944610
[ Upstream commit fb4b1373dcab086d0619c29310f0466a0b2ceb8a ]

Function "dma_map_sg" is entitled to merge adjacent entries
and return a value smaller than what was passed as "nents".

Subsequently "ib_map_mr_sg" needs to work with this value ("sg_dma_len")
rather than the original "nents" parameter ("sg_len").

This old RDS bug was exposed and reliably causes kernel panics
(using RDMA operations "rds-stress -D") on x86_64 starting with:
commit c588072bba6b ("iommu/vt-d: Convert intel iommu driver to the iommu ops")

Simply put: Linux 5.11 and later.

Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Link: https://lore.kernel.org/r/60efc69f-1f35-529d-a7ef-da0549cad143@oracle.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
net/rds/ib_frmr.c