linux-stable/net/sunrpc/xprtrdma
Chuck Lever f5778c2d65 xprtrdma: Fix corner cases when handling device removal
commit 2552428863 upstream.

Michal Kalderon has found some corner cases around device unload
with active NFS mounts that I didn't have the imagination to test
when xprtrdma device removal was added last year.

- The ULP device removal handler is responsible for deallocating
  the PD. That wasn't clear to me initially, and my own testing
  suggested it was not necessary, but that is incorrect.

- The transport destruction path can no longer assume that there
  is a valid ID.

- When destroying a transport, ensure that ib_free_cq() is not
  invoked on a CQ that was already released.

Reported-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Fixes: bebd031866 ("xprtrdma: Support unplugging an HCA from ...")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@vger.kernel.org # v4.12+
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-22 14:28:42 +02:00
..
backchannel.c xprtrdma: Fix backchannel allocation of extra rpcrdma_reps 2018-04-26 11:02:04 +02:00
fmr_ops.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
frwr_ops.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.c rpcrdma: Merge svcrdma and xprtrdma modules into one 2015-06-04 16:56:02 -04:00
rpc_rdma.c xprtrdma: Return -ENOBUFS when no pages are available 2018-07-03 11:24:54 +02:00
svc_rdma.c svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt 2017-04-25 17:25:55 -04:00
svc_rdma_backchannel.c svcrdma: Preserve CB send buffer across retransmits 2017-11-30 08:40:54 +00:00
svc_rdma_recvfrom.c svcrdma: Properly compute .len and .buflen for received RPC Calls 2017-07-12 15:54:57 -04:00
svc_rdma_rw.c svcrdma: Fix Read chunk round-up 2018-04-26 11:02:19 +02:00
svc_rdma_sendto.c svcrdma: fix an incorrect check on -E2BIG and -EINVAL 2017-07-13 14:18:47 -04:00
svc_rdma_transport.c svcrdma: Estimate Send Queue depth properly 2017-09-05 15:15:31 -04:00
transport.c xprtrdma: Don't defer fencing an async RPC's chunks 2017-12-20 10:10:36 +01:00
verbs.c xprtrdma: Fix corner cases when handling device removal 2018-07-22 14:28:42 +02:00
xprt_rdma.h xprtrdma: Fix backchannel allocation of extra rpcrdma_reps 2018-04-26 11:02:04 +02:00