5.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Aloni dan.aloni@vastdata.com
commit a9c10b5b3b67b3750a10c8b089b2e05f5e176e33 upstream.
If there are failures then we must not leave the non-NULL pointers with the error value, otherwise `rpcrdma_ep_destroy` gets confused and tries free them, resulting in an Oops.
Signed-off-by: Dan Aloni dan.aloni@vastdata.com Acked-by: Chuck Lever chuck.lever@oracle.com Signed-off-by: Anna Schumaker Anna.Schumaker@Netapp.com [ Larry: backport to 5.4.y. Minor conflict resolved due to missing commit 93aa8e0a9de80 xprtrdma: Merge struct rpcrdma_ia into struct rpcrdma_ep ] Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org Signed-off-by: Larry Bassel larry.bassel@oracle.com --- net/sunrpc/xprtrdma/verbs.c | 2 ++ 1 file changed, 2 insertions(+)
--- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -525,6 +525,7 @@ int rpcrdma_ep_create(struct rpcrdma_xpr IB_POLL_WORKQUEUE); if (IS_ERR(sendcq)) { rc = PTR_ERR(sendcq); + sendcq = NULL; goto out1; }
@@ -533,6 +534,7 @@ int rpcrdma_ep_create(struct rpcrdma_xpr IB_POLL_WORKQUEUE); if (IS_ERR(recvcq)) { rc = PTR_ERR(recvcq); + recvcq = NULL; goto out2; }