linux/drivers/infiniband/ulp
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 RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
iser IB/iser: Always check sig MR before putting it to the free pool 2020-03-26 16:46:54 -03:00
isert scsi: Revert "RDMA/isert: Fix a recently introduced regression related to logout" 2020-02-14 17:13:53 -05:00
opa_vnic RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
srp RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
srpt RDMA: Allow ib_client's to fail when add() is called 2020-05-06 11:57:33 -03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00