OpenCloudOS-Kernel/drivers/infiniband/sw/rdmavt
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
..
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
ah.c RDMA: Correct trivial kernel-doc inconsistencies 2020-06-22 11:57:39 -03:00
ah.h RDMA: Group create AH arguments in struct 2020-05-02 20:19:53 -03:00
cq.c IB/rdmavt: Always return ERR_PTR from rvt_create_mmap_info() 2020-04-24 15:31:26 -03:00
cq.h RDMA: Convert CQ allocations to be under core responsibility 2019-06-11 16:39:49 -04:00
mad.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
mad.h IB/rdmavt: Clean up distinction between port number and index 2016-03-10 20:37:31 -05:00
mcast.c infiniband: fix sw/rdmavt/* kernel-doc notation 2018-01-10 22:00:35 -07:00
mcast.h IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
mmap.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
mmap.h IB: Pass only ib_udata in function prototypes 2019-04-01 15:00:47 -03:00
mr.c RDMA: Remove the udata parameter from alloc_mr callback 2020-07-06 19:25:53 -03:00
mr.h RDMA: Remove the udata parameter from alloc_mr callback 2020-07-06 19:25:53 -03:00
pd.c RDMA: Restore ability to fail on PD deallocate 2020-09-09 13:57:22 -03:00
pd.h 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
qp.h IB/hfi1: Move receive work queue struct into uapi directory 2019-06-28 22:32:16 -03:00
rc.c IB/rdmavt: Fix RQ counting issues causing use of an invalid RWQE 2020-07-29 15:54:36 -03:00
srq.c IB/rdmavt: Always return ERR_PTR from rvt_create_mmap_info() 2020-04-24 15:31:26 -03:00
srq.h RDMA: Handle SRQ allocations by IB/core 2019-04-08 13:05:25 -03:00
trace.c IB/rdmavt: Fix copyright date 2016-03-10 20:37:27 -05:00
trace.h IB/{rdmavt, hfi1, qib}: Remove get_card_name() downcall 2018-01-05 13:34:55 -05:00
trace_cq.h IB/rdmavt: Add wc_flags and wc_immdata to cq entry trace 2019-01-18 13:48:19 -07:00
trace_mr.h IB/rdmavt: Add trace for map_mr_sg 2019-06-28 22:34:26 -03:00
trace_qp.h IB/rdmavt: Fix ab/ba include issues 2019-04-24 11:31:49 -03:00
trace_rc.h IB/rdmavt: Fix ab/ba include issues 2019-04-24 11:31:49 -03:00
trace_rvt.h IB/rdmavt: Fix trace hierarchy 2016-12-11 15:25:13 -05:00
trace_tx.h IB/rdmavt: Fix ab/ba include issues 2019-04-24 11:31:49 -03:00
vt.c RDMA/rdmavt: Remove FMR memory registration 2020-06-02 20:32:54 -03:00
vt.h IB/{hfi1, qib, rdmavt}: Put qp in error state when cq is full 2019-06-28 22:34:26 -03:00