linux-brain/net/rds
Gerd Rausch f3a1ac258e net/rds: dma_map_sg is entitled to merge entries
[ 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>
2021-09-03 10:08:15 +02:00
..
Kconfig net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
Makefile rds: remove trailing whitespace and blank lines 2018-07-24 14:10:42 -07:00
af_rds.c Convert usage of IN_MULTICAST to ipv4_is_multicast 2019-09-05 09:38:32 +02:00
bind.c net/rds: Check laddr_check before calling it 2019-09-27 12:10:55 +02:00
cong.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
connection.c RDS tcp loopback connection can hang 2021-06-16 11:59:35 +02:00
ib.c net/rds: Fix error handling in rds_ib_add_one() 2019-10-02 12:16:57 -04:00
ib.h net: rds: add service level support in rds-info 2019-08-24 16:55:25 -07:00
ib_cm.c rds: ib: update WR sizes when bringing up connection 2019-11-16 12:59:08 -08:00
ib_fmr.c net: rds: exchange of 8K and 1M pool 2019-04-24 12:07:08 -07:00
ib_frmr.c net/rds: dma_map_sg is entitled to merge entries 2021-09-03 10:08:15 +02:00
ib_mr.h net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after posting IB_WR_LOCAL_INV 2019-07-17 12:06:52 -07:00
ib_rdma.c net/rds: Fix NULL/ERR_PTR inconsistency 2019-07-17 12:06:52 -07:00
ib_recv.c net/rds: Whitelist rdma_cookie and rx_tstamp for usercopy 2019-08-23 14:55:52 -07:00
ib_ring.c
ib_send.c rds: fix reordering with composite message notification 2019-07-09 21:45:41 -07:00
ib_stats.c net/rds: Fix 'ib_evt_handler_call' element in 'rds_ib_stat_names' 2019-09-15 20:56:19 +02:00
ib_sysctl.c net: Convert uses of typedef ctl_table to struct ctl_table 2013-06-13 02:36:09 -07:00
info.c mm/gup: change GUP fast to use flags rather than a write 'bool' 2019-05-14 09:47:46 -07:00
info.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
loop.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
loop.h rds: clean up loopback rds_connections on netns deletion 2018-06-27 10:11:03 +09:00
message.c net/rds: Fix a use after free in rds_message_map_pages 2021-04-14 08:24:15 +02:00
page.c rds: remove dead code 2016-12-26 21:35:39 -05:00
rdma.c net/rds: restrict iovecs length for RDS_CMSG_RDMA_ARGS 2021-02-17 10:35:19 +01:00
rdma_transport.c net: rds: add service level support in rds-info 2019-08-24 16:55:25 -07:00
rdma_transport.h rds: rdma: add consumer reject 2019-02-04 14:59:11 -08:00
rds.h net/rds: Use ERR_PTR for rds_message_alloc_sgs() 2020-05-20 08:20:27 +02:00
rds_single_path.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
recv.c net: rds: fix memory leak in rds_recvmsg 2021-06-23 14:41:24 +02:00
send.c net/rds: Use ERR_PTR for rds_message_alloc_sgs() 2020-05-20 08:20:27 +02:00
stats.c rds: check for excessive looping in rds_send_xmit 2019-08-15 12:04:24 -07:00
sysctl.c net: rds: fix coding style issues 2016-06-18 21:34:09 -07:00
tcp.c RDS tcp loopback connection can hang 2021-06-16 11:59:35 +02:00
tcp.h RDS tcp loopback connection can hang 2021-06-16 11:59:35 +02:00
tcp_connect.c rds: Enable RDS IPv6 support 2018-07-23 21:17:44 -07:00
tcp_listen.c RDS tcp loopback connection can hang 2021-06-16 11:59:35 +02:00
tcp_recv.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
tcp_send.c rds: Changing IP address internal representation to struct in6_addr 2018-07-23 21:17:44 -07:00
tcp_stats.c net: rds: fix const array syntax 2011-07-01 16:16:19 -07:00
threads.c rds: make v3.1 as compat version 2019-02-04 14:59:11 -08:00
transport.c rds: remove trailing whitespace and blank lines 2018-07-24 14:10:42 -07:00