diff options
| author | Allison Henderson <achender@kernel.org> | 2026-10-21 12:58:37 -0700 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-10-27 11:30:25 +0100 |
| commit | ffbbc315b8b883a1c0e131fb3186b9428d2812aa (patch) | |
| tree | a8a3b334a406e27c40ccbffe5fc5d499739491ed /include/linux/timerqueue.h | |
| parent | fbea154a86641d2543a871aa19f7c77a366de542 (diff) | |
net/rds: do not initialize transports after rds_init() failed
rds, rds_rdma and rds_tcp each have their own module_init(). When they
are built in, those run in link order, so rds_init() goes first, but
do_initcalls() does not stop when it fails. The transports then
initialize against a core that has already been torn down: rds_wq has
been destroyed, yet rds_ib_dev_put(), rds_ib_unregister_client() and
rds_tcp_accept_work() still queue onto or flush it, and
rds_trans_register() hands the transports to a core whose socket
family may never have been registered.
This was seen with CONFIG_SYSCTL=n, where rds_sysctl_init() failed and
rds_ib_init()'s error path then flushed the freed rds_wq [1], but any
rds_init() failure after rds_threads_init() has the same effect.
Record whether rds_init() succeeded and have rds_rdma_init() and
rds_tcp_init() bail out with -ENODEV otherwise. Modular builds are
unaffected: the transports need symbols exported by rds.ko, so they
cannot be loaded unless rds_init() succeeded.
[1] https://lore.kernel.org/oe-lkp/202610190310.9737b2e3-lkp@intel.com
Fixes: 55b7ed0b582f ("RDS: Common RDMA transport code")
Fixes: 70041088e3b9 ("RDS: Add TCP transport to RDS")
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Allison Henderson <achender@kernel.org>
Link: https://patch.msgid.link/20261021195837.142802-3-achender@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
