linux/drivers/infiniband/ulp/ipoib
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
..
ipoib_cm.c IB/ipoib: Remove memset after vzalloc in ipoib_cm.c 2019-07-03 14:27:37 -03:00
ipoib_ethtool.c RDMA 5.7 pull request 2020-04-01 18:18:18 -07:00
ipoib_fs.c infiniband: ipoib: no need to check return value of debugfs_create functions 2019-01-24 09:22:30 -07:00
ipoib_ib.c net: Use skb_frag_off accessors 2019-07-30 14:21:32 -07:00
ipoib_main.c RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
ipoib_multicast.c IB/IPoIB: Set ah valid flag in multicast send flow 2018-08-01 15:23:03 -06:00
ipoib_netlink.c RDMA/netdev: Fix netlink support in IPoIB 2018-10-10 17:58:12 -07:00
ipoib_verbs.c RDMA/ipoib: Remove check of destroy CQ 2019-05-21 15:50:53 -03:00
ipoib_vlan.c RDMA/netdev: Fix netlink support in IPoIB 2018-10-10 17:58:12 -07:00
ipoib.h RDMA/ipoib: Don't set constant driver version 2020-02-27 16:40:40 -04:00
Kconfig Linux 5.2-rc6 2019-06-28 21:18:23 -03:00
Makefile