linux/net/rds
Allison Henderson ba3d1f480c net/rds: size a connection's path set by the transport it ends up with
__rds_conn_create() computes npaths from the caller's transport before
it decides whether a connection to one of the host's own addresses is
to be handled by the loopback transport instead.  That substitution is
what an RDS/TCP socket sending to a local address gets, and after it
the path init loop still runs for the TCP transport's RDS_MPATH_WORKERS
paths and allocates an ordered workqueue for each, while
rds_loop_conn_alloc() only ever provides transport data for path 0.

rds_conn_destroy() sizes its teardown from c_trans, by then the
loopback transport, so it visits path 0 only - and
rds_conn_path_destroy() would skip the other paths anyway, since it
returns before destroy_workqueue() for a path without transport data.
kfree(c_path) then drops the last pointers to seven workqueues.  That
repeats for every such connection, on every netns teardown or module
unload, and every distinct local destination address is a separate
connection.

Recompute npaths once the transport is final, so that creation and
destruction agree on the set of paths.  The c_path array stays sized
for the caller's transport; the unused entries are freed with it.

Fixes: 4716af3897 ("net/rds: Give each connection path its own workqueue")
Signed-off-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20260921215027.174657-1-achender@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-09-24 10:03:23 -07:00
..
af_rds.c rds: convert to getsockopt_iter 2026-06-11 12:19:05 +02:00
bind.c net: Convert proto_ops bind() callbacks to use sockaddr_unsized 2025-11-04 19:10:32 -08:00
cong.c net/rds: use wq_has_sleeper() in rds_cong_map_updated() 2026-08-24 12:03:25 -07:00
connection.c net/rds: size a connection's path set by the transport it ends up with 2026-09-24 10:03:23 -07:00
ib_cm.c rds: ib: use rds_conn_drop() on protocol version mismatch 2026-09-14 18:47:52 -07:00
ib_frmr.c rds: ib: Clear the sg list when mapping an MR fails 2026-09-24 13:18:19 +02:00
ib_mr.h rds: ib: Remove unused extern definition 2025-09-08 18:16:49 -07:00
ib_rdma.c net/rds: unpin MR pages with unpin_user_pages_dirty_lock() 2026-08-04 18:01:02 -07:00
ib_recv.c net/rds: acquire the fastpath locks in rds_conn_shutdown() 2026-09-02 19:42:23 -07:00
ib_ring.c
ib_send.c net/rds: fix NULL deref in rds_ib_send_cqe_handler() on masked atomic completion 2026-06-09 18:32:54 -07:00
ib_stats.c
ib_sysctl.c net: rds: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
ib.c RDMA v7.3 merge window pull 2026-08-21 11:48:54 -07:00
ib.h net/rds: Optimize rds_ib_laddr_check 2026-04-12 13:33:19 -07:00
info.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
info.h rds: convert to getsockopt_iter 2026-06-11 12:19:05 +02:00
Kconfig net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
loop.c net/rds: initialize i_conn_path in rds_inc_init() 2026-08-13 12:52:29 +02:00
loop.h
Makefile net: rds: add option for GCOV profiling 2024-08-09 13:18:46 +01:00
message.c net/rds: fix tcp stream corruption with large pages 2026-09-10 08:19:17 -07:00
page.c rds: Use nested-BH locking for rds_page_remainder 2025-05-15 15:23:31 +02:00
rdma_transport.c net: rds: Fix possible NULL-pointer dereference 2023-09-20 08:49:03 +01:00
rdma_transport.h net/rds: Remove unused function declarations 2023-08-13 12:25:42 +01:00
rdma.c net/rds: hold the socket while an rds_mr references it 2026-08-04 18:00:54 -07:00
rds_single_path.h
rds.h net/rds: hold the socket while an rds_mr references it 2026-08-04 18:00:54 -07:00
recv.c net/rds: clear i_rx_lat_trace in rds_inc_path_init() 2026-08-13 12:53:14 +02:00
send.c net/rds: acquire the fastpath locks in rds_conn_shutdown() 2026-09-02 19:42:23 -07:00
stats.c net/rds: Use the first lane until RDS_EXTHDR_NPATHS arrives 2026-02-04 20:46:39 -08:00
sysctl.c net: rds: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:42 +01:00
tcp_connect.c net/rds: rds_tcp_conn_path_shutdown must not discard messages 2026-02-04 20:46:38 -08:00
tcp_listen.c net/rds: tcp: don't force RDS_CONN_RESETTING over a concurrent shutdown 2026-09-02 19:42:23 -07:00
tcp_recv.c net/rds: use special gfp_t format specifier 2026-05-28 21:04:53 -07:00
tcp_send.c net/rds: rds_tcp_conn_path_shutdown must not discard messages 2026-02-04 20:46:38 -08:00
tcp_stats.c
tcp.c net/rds: don't let rds_conn_shutdown() consume a concurrent drop 2026-09-02 19:42:24 -07:00
tcp.h net/rds: Trigger rds_send_ping() more than once 2026-02-04 20:46:39 -08:00
threads.c net/rds: Add per cp work queue 2026-01-13 12:27:03 +01:00
transport.c