xprtrdma: Free the pd if ib_query_qp() fails
commit 5ae711a2 upstream. If ib_query_qp() fails or the memory registration mode isn't supported, don't leak the PD. An orphaned IB/core resource will cause IB module removal to hang. Fixes: bd7ed1d1 ("RPC/RDMA: check selected memory registration ...") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> [lizf: Backported to 3.4: only two goto statements need to be changed] Signed-off-by: Zefan Li <lizefan@huawei.com>
Showing
Please register or sign in to comment