mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2025-12-02 06:54:27 +00:00
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> |
||
|---|---|---|
| .. | ||
| ah.c | ||
| cmd.c | ||
| cmd.h | ||
| cong.c | ||
| cq.c | ||
| devx.c | ||
| doorbell.c | ||
| flow.c | ||
| gsi.c | ||
| ib_rep.c | ||
| ib_rep.h | ||
| ib_virt.c | ||
| Kconfig | ||
| mad.c | ||
| main.c | ||
| Makefile | ||
| mem.c | ||
| mlx5_ib.h | ||
| mr.c | ||
| odp.c | ||
| qos.c | ||
| qp.c | ||
| qp.h | ||
| qpc.c | ||
| restrack.c | ||
| srq_cmd.c | ||
| srq.c | ||
| srq.h | ||
| wr.c | ||
| wr.h | ||