]> git.baikalelectronics.ru Git - 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)
committerJakub Kicinski <kuba@kernel.org>
Wed, 18 Aug 2021 22:35:50 +0000 (15:35 -0700)
commita37b565e7e18b64569aa74fde946f3d0ffadd389
tree0a8689b6c5ad58ba5fc7dcaa608d24b66cba51d3
parentbcf2815b6e52b1fbd4bbc981bbe0ff2758247e60
net/rds: dma_map_sg is entitled to merge entries

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 42fc6fbaca8c ("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>
net/rds/ib_frmr.c