mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 07:02:23 +00:00
0ac8903cbb
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 |