linux/drivers/infiniband/hw
Jason Gunthorpe 0ac8903cbb RDMA/core: Allow the ioctl layer to abort a fully created uobject
While creating a uobject every create reaches a point where the uobject is
fully initialized. For ioctls that go on to copy_to_user this means they
need to open code the destruction of a fully created uobject - ie the
RDMA_REMOVE_DESTROY sort of flow.

Open coding this creates bugs, eg the CQ does not properly flush the
events list when it does its error unwind.

Provide a uverbs_finalize_uobj_create() function which indicates that the
uobject is fully initialized and that abort should call to destroy_hw to
destroy the uobj->object and related.

Methods can call this function if they go on to have error cases after
setting uobj->object. Once done those error cases can simply do return,
without an error unwind.

Link: https://lore.kernel.org/r/20200519072711.257271-2-leon@kernel.org
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2020-05-21 20:10:46 -03:00
..
bnxt_re RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
cxgb4 RDMA/iw_cxgb4: Fix incorrect function parameters 2020-05-12 11:47:48 -03:00
efa RDMA/efa: Report host information to the device 2020-05-21 10:05:00 -03:00
hfi1 Linux 5.7-rc6 2020-05-21 17:08:27 -03:00
hns RDMA/hns: Reserve one sge in order to avoid local length error 2020-05-19 20:54:59 -03:00
i40iw IB/i40iw: Remove bogus call to netdev_master_upper_dev_get() 2020-05-12 11:47:48 -03:00
mlx4 Linux 5.7-rc6 2020-05-21 17:08:27 -03:00
mlx5 RDMA/core: Allow the ioctl layer to abort a fully created uobject 2020-05-21 20:10:46 -03:00
mthca RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
ocrdma RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
qedr RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
qib IB/qib: Remove unused variable ret 2020-04-14 16:34:17 -03:00
usnic RDMA/providers: Fix return value when QP type isn't supported 2020-03-04 12:13:42 -04:00
vmw_pvrdma RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
Makefile RDMA/iw_cxgb3: Remove the iw_cxgb3 module from kernel 2019-10-04 15:08:59 -03:00