linux/drivers/infiniband/hw/cxgb4
Leon Romanovsky 91a7c58fce RDMA: Restore ability to fail on PD deallocate
The IB verbs objects are counted by the kernel and ib_core ensures that
deallocate PD will success so it will be called once all other objects
that depends on PD will be released. This is achieved by managing various
reference counters on such objects.

The mlx5 driver didn't follow this standard flow when allowed DEVX objects
that are not managed by ib_core to be interleaved with the ones under
ib_core responsibility.

In such interleaved scenarios deallocate command can fail and ib_core will
leave uobject in internal DB and attempt to clean it later to free
resources anyway.

This change partially restores returned value from dealloc_pd() for all
drivers, but keeping in mind that non-DEVX devices and kernel verbs paths
shouldn't fail.

Fixes: 21a428a019 ("RDMA: Handle PD allocations by IB/core")
Link: https://lore.kernel.org/r/20200907120921.476363-2-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2020-09-09 13:57:22 -03:00
..
cm.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cq.c treewide: Remove uninitialized_var() usage 2020-07-16 12:35:15 -07:00
device.c RDMA/iw_cxgb4: cleanup device debugfs entries on ULD remove 2020-05-25 15:38:35 -03:00
ev.c cxgb4: Convert qpidr to XArray 2019-03-25 15:39:18 -03:00
id_table.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
iw_cxgb4.h RDMA: Remove the udata parameter from alloc_mr callback 2020-07-06 19:25:53 -03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mem.c IB/uverbs: Set IOVA on IB MR in uverbs layer 2020-07-06 19:50:33 -03:00
provider.c RDMA: Restore ability to fail on PD deallocate 2020-09-09 13:57:22 -03:00
qp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
resource.c RDMA/cxgb4: Use sizeof() notation 2019-05-27 14:32:17 -03:00
restrack.c RDMA: Add dedicated CM_ID resource tracker function 2020-06-23 11:46:27 -03:00
t4.h iw_cxgb4: complete the cached SRQ buffers 2019-02-08 17:02:05 -07:00
t4fw_ri_api.h RDMA: Replace zero-length array with flexible-array member 2020-02-20 13:33:51 -04:00