RDMA/core: Change how failing destroy is handled during uobj abort
Currently it triggers a WARN_ON and then goes ahead and destroys the uobject anyhow, leaking any driver memory. The only place that leaks driver memory should be during FD close() in uverbs_destroy_ufile_hw(). Drivers are only allowed to fail destroy uobjects if they guarantee destroy will eventually succeed. uverbs_destroy_ufile_hw() provides the loop to give the driver that chance. Link: https://lore.kernel.org/r/20200902081708.746631-1-leon@kernel.org Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
@@ -1463,11 +1463,6 @@ enum rdma_remove_reason {
|
||||
RDMA_REMOVE_DRIVER_REMOVE,
|
||||
/* uobj is being cleaned-up before being committed */
|
||||
RDMA_REMOVE_ABORT,
|
||||
/*
|
||||
* uobj has been fully created, with the uobj->object set, but is being
|
||||
* cleaned up before being comitted
|
||||
*/
|
||||
RDMA_REMOVE_ABORT_HWOBJ,
|
||||
};
|
||||
|
||||
struct ib_rdmacg_object {
|
||||
|
Reference in New Issue
Block a user