linux/drivers/infiniband/hw/mlx5
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
..
ah.c RDMA/mlx5: Set UDP source port based on the grh.flow_label 2020-05-06 16:51:44 -03:00
cmd.c RDMA/mlx5: Update mlx5_ib to use new cmd interface 2020-05-06 17:42:45 -03:00
cmd.h RDMA/mlx5: Update mlx5_ib to use new cmd interface 2020-05-06 17:42:45 -03:00
cong.c RDMA/mlx5: Update mlx5_ib to use new cmd interface 2020-05-06 17:42:45 -03:00
cq.c net/mlx5: Refactor imm_inval_pkey field in cqe struct 2020-04-28 12:45:15 -07:00
devx.c RDMA/core: Allow the ioctl layer to abort a fully created uobject 2020-05-21 20:10:46 -03:00
doorbell.c IB: Allow calls to ib_umem_get from kernel ULPs 2020-01-16 16:14:28 +02:00
flow.c RDMA/mlx5: Add support for drop action in DV steering 2020-05-13 15:58:54 -03:00
gsi.c RDMA/mlx5: Set lag tx affinity according to slave 2020-05-02 20:19:54 -03:00
ib_rep.c IB/mlx5: Rename profile and init methods 2019-11-11 12:15:29 -08:00
ib_rep.h RDMA/mlx5: Assign profile before calling stages 2020-05-06 17:52:01 -03:00
ib_virt.c net/mlx5: Update vport.c to new cmd interface 2020-04-23 21:42:02 +03:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mad.c net/mlx5: Update vport.c to new cmd interface 2020-04-23 21:42:02 +03:00
main.c RDMA/core: Allow the ioctl layer to abort a fully created uobject 2020-05-21 20:10:46 -03:00
Makefile RDMA/mlx5: Move all WR logic from qp.c to separate file 2020-05-06 17:42:45 -03:00
mem.c IB/mlx5: Generally use the WC auto detection test result 2020-03-24 20:22:21 -03:00
mlx5_ib.h RDMA/mlx5: Move all WR logic from qp.c to separate file 2020-05-06 17:42:45 -03:00
mr.c RDMA/mlx5: Allow MRs to be created in the cache synchronously 2020-03-13 11:08:02 -03:00
odp.c RDMA/mlx5: Update mlx5_ib to use new cmd interface 2020-05-06 17:42:45 -03:00
qos.c RDMA/core: Allow the ioctl layer to abort a fully created uobject 2020-05-21 20:10:46 -03:00
qp.c Linux 5.7-rc6 2020-05-21 17:08:27 -03:00
qp.h net/mlx5: Move QP logic to mlx5_ib 2020-04-19 15:53:21 +03:00
qpc.c net/mlx5: Move QP logic to mlx5_ib 2020-04-19 15:53:21 +03:00
restrack.c RDMA/nldev: Provide MR statistics 2019-10-22 15:33:31 -03:00
srq.c RDMA/mlx5: Fix udata response upon SRQ creation 2020-04-14 15:56:34 -03:00
srq.h RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00
srq_cmd.c RDMA/mlx5: Fix query_srq_cmd() function 2020-05-13 16:01:50 -03:00
wr.c RDMA/mlx5: Move all WR logic from qp.c to separate file 2020-05-06 17:42:45 -03:00
wr.h RDMA/mlx5: Move all WR logic from qp.c to separate file 2020-05-06 17:42:45 -03:00