linux-stable/net/smc
Wen Gu b03255294e net/smc: avoid overwriting when adjusting sock bufsizes
[ Upstream commit fb0aa0781a ]

When copying smc settings to clcsock, avoid setting clcsock's sk_sndbuf
to sysctl_tcp_wmem[1], since this may overwrite the value set by
tcp_sndbuf_expand() in TCP connection establishment.

And the other setting sk_{snd|rcv}buf to sysctl value in
smc_adjust_sock_bufsizes() can also be omitted since the initialization
of smc sock and clcsock has set sk_{snd|rcv}buf to smc.sysctl_{w|r}mem
or ipv4_sysctl_tcp_{w|r}mem[1].

Fixes: 30c3c4a449 ("net/smc: Use correct buffer sizes when switching between TCP and SMC")
Link: https://lore.kernel.org/r/5eaf3858-e7fd-4db8-83e8-3d7a3e0e9ae2@linux.alibaba.com
Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: Wenjia Zhang <wenjia@linux.ibm.com>
Reviewed-by: Gerd Bayer <gbayer@linux.ibm.com>, too.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-21 14:38:16 +02:00
..
af_smc.c net/smc: avoid overwriting when adjusting sock bufsizes 2024-06-21 14:38:16 +02:00
Kconfig net/smc: Fix dependency of SMC on ISM 2023-10-10 11:51:41 +02:00
Makefile net/smc: fix compile warning for smc_sysctl 2022-03-07 11:59:17 +00:00
smc.h net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT 2023-11-20 11:59:35 +01:00
smc_cdc.c net/smc: allow cdc msg send rather than drop it with NULL sndbuf_desc 2023-11-20 11:59:35 +01:00
smc_cdc.h net/smc: fix kernel panic caused by race of smc_sock 2021-12-28 12:42:45 +00:00
smc_clc.c net/smc: disable SEID on non-s390 archs where virtual ISM may be used 2024-02-05 20:14:25 +00:00
smc_clc.h net/smc: fix missing byte order conversion in CLC handshake 2023-12-13 18:45:11 +01:00
smc_close.c net/smc: put sk reference if close work was canceled 2023-11-20 11:59:35 +01:00
smc_close.h
smc_core.c net/smc: use smc_lgr_list.lock to protect smc_lgr_list.list iterate in smcr_port_add 2023-09-10 19:31:42 +01:00
smc_core.h net/smc: support max links per lgr negotiation in clc handshake 2023-08-19 12:46:53 +01:00
smc_diag.c net/smc: fix illegal rmb_desc access in SMC-D connection dump 2024-01-31 16:19:00 -08:00
smc_ib.c net/smc: fix neighbour and rtable leak in smc_ib_find_route() 2024-05-17 12:02:24 +02:00
smc_ib.h net/smc: fix smc clc failed issue when netdevice not in init_net 2023-10-13 16:52:02 -07:00
smc_ism.c net/smc: Introduce explicit check for v2 support 2023-03-15 08:18:35 +00:00
smc_ism.h net/smc: Register SMC-D as ISM client 2023-01-25 09:46:48 +00:00
smc_llc.c net/smc: support max links per lgr negotiation in clc handshake 2023-08-19 12:46:53 +01:00
smc_llc.h net/smc: Introduce a specific sysctl for TEST_LINK time 2022-09-22 12:58:21 +02:00
smc_netlink.c genetlink: start to validate reserved header bytes 2022-08-29 12:47:15 +01:00
smc_netlink.h
smc_netns.h
smc_pnet.c net/smc: reduce rtnl pressure in smc_pnet_create_pnetids_list() 2024-04-13 13:07:33 +02:00
smc_pnet.h net/smc: Use a mutex for locking "struct smc_pnettable" 2022-02-24 09:09:33 -08:00
smc_rx.c net: deal with most data-races in sk_wait_event() 2023-05-10 10:03:32 +01:00
smc_rx.h
smc_stats.c smc: Drop smc_sendpage() in favour of smc_sendmsg() + MSG_SPLICE_PAGES 2023-06-24 15:50:12 -07:00
smc_stats.h net/smc: Fix pos miscalculation in statistics 2023-10-11 10:36:35 +01:00
smc_sysctl.c sysctl-6.6-rc1 2023-08-29 17:39:15 -07:00
smc_sysctl.h net/smc: fix -Wmissing-prototypes warning when CONFIG_SYSCTL not set 2022-03-09 20:02:35 -08:00
smc_tracepoint.c
smc_tracepoint.h net/smc: Add net namespace for tracepoints 2022-01-02 12:07:39 +00:00
smc_tx.c smc: Drop smc_sendpage() in favour of smc_sendmsg() + MSG_SPLICE_PAGES 2023-06-24 15:50:12 -07:00
smc_tx.h smc: Drop smc_sendpage() in favour of smc_sendmsg() + MSG_SPLICE_PAGES 2023-06-24 15:50:12 -07:00
smc_wr.c net/smc: Use percpu ref for wr tx reference 2023-03-17 08:59:01 +00:00
smc_wr.h net/smc: Use percpu ref for wr tx reference 2023-03-17 08:59:01 +00:00