RDMA/cma: Revert INIT-INIT patch
authorMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Thu, 29 Jul 2021 18:26:22 +0000 (14:26 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 2 Aug 2021 15:45:22 +0000 (12:45 -0300)
commitdb4657afd10e45855ac1d8437fcc9a86bd3d741d
tree116e50fdcc3af066f6954a3ca15dc960d754271a
parentd6793ca97b76642b77629dd0783ec64782a50bdb
RDMA/cma: Revert INIT-INIT patch

The net/sunrpc/xprtrdma module creates its QP using rdma_create_qp() and
immediately post receives, implicitly assuming the QP is in the INIT state
and thus valid for ib_post_recv().

The patch noted in Fixes: removed the RESET->INIT modifiy from
rdma_create_qp(), breaking NFS rdma for verbs providers that fail the
ib_post_recv() for a bad state.

This situation was proven using kprobes in rvt_post_recv() and
rvt_modify_qp(). The traces showed that the rvt_post_recv() failed before
ANY modify QP and that the current state was RESET.

Fix by reverting the patch below.

Fixes: dc70f7c3ed34 ("RDMA/cma: Remove unnecessary INIT->INIT transition")
Link: https://lore.kernel.org/r/1627583182-81330-1-git-send-email-mike.marciniszyn@cornelisnetworks.com
Cc: Haakon Bugge <haakon.bugge@oracle.com>
Cc: Chuck Lever III <chuck.lever@oracle.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/core/cma.c