linux/net/smc
Jason Gunthorpe 11a0ae4c4b RDMA: Allow ib_client's to fail when add() is called
When a client is added it isn't allowed to fail, but all the client's have
various failure paths within their add routines.

This creates the very fringe condition where the client was added, failed
during add and didn't set the client_data. The core code will then still
call other client_data centric ops like remove(), rename(), get_nl_info(),
and get_net_dev_by_params() with NULL client_data - which is confusing and
unexpected.

If the add() callback fails, then do not call any more client ops for the
device, even remove.

Remove all the now redundant checks for NULL client_data in ops callbacks.

Update all the add() callbacks to return error codes
appropriately. EOPNOTSUPP is used for cases where the ULP does not support
the ib_device - eg because it only works with IB.

Link: https://lore.kernel.org/r/20200421172440.387069-1-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-05-06 11:57:33 -03:00
..
af_smc.c net/smc: fix cleanup for linkgroup setup failures 2020-02-26 20:18:07 -08:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
smc_cdc.c net/smc: fix final cleanup sequence for SMCD devices 2019-11-15 12:28:28 -08:00
smc_cdc.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
smc_clc.c net/smc: improve peer ID in CLC decline for SMC-R 2020-02-26 20:27:06 -08:00
smc_clc.h net/smc: improve smc_conn_create reason codes 2019-04-12 10:50:56 -07:00
smc_close.c net/smc: remove unused constant 2019-11-16 12:26:49 -08:00
smc_close.h net/smc: remove close abort worker 2019-10-22 11:23:44 -07:00
smc_core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-02-27 18:31:39 -08:00
smc_core.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-02-27 18:31:39 -08:00
smc_diag.c net/smc: fix leak of kernel memory to user space 2020-02-11 17:04:42 -08:00
smc_ib.c RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
smc_ib.h net/smc: improve peer ID in CLC decline for SMC-R 2020-02-26 20:27:06 -08:00
smc_ism.c net/smc: introduce bookkeeping of SMCD link groups 2019-11-15 12:28:28 -08:00
smc_ism.h
smc_llc.c net/smc: simplify normal link termination 2020-02-17 14:50:24 -08:00
smc_llc.h
smc_netns.h net/smc: add pnet table namespace support 2019-02-21 10:34:37 -08:00
smc_pnet.c net/smc: allow unprivileged users to read pnet table 2020-01-21 11:39:56 +01:00
smc_pnet.h net/smc: consolidate function parameters 2019-04-12 10:50:56 -07:00
smc_rx.c net/smc: cancel send and receive for terminated socket 2019-10-22 11:23:43 -07:00
smc_rx.h
smc_tx.c net/smc: use termination worker under send_lock 2020-02-17 14:50:24 -08:00
smc_tx.h
smc_wr.c net/smc: wait for tx completions before link freeing 2019-11-15 12:28:28 -08:00
smc_wr.h net/smc: no WR buffer wait for terminating link group 2019-11-15 12:28:28 -08:00
smc.h net/smc: cancel send and receive for terminated socket 2019-10-22 11:23:43 -07:00