From: Dan Aloni dan.aloni@vastdata.com
[ Upstream commit a9c10b5b3b67b3750a10c8b089b2e05f5e176e33 ]
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 (cherry picked from commit a9c10b5b3b67b3750a10c8b089b2e05f5e176e33) [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: Larry Bassel larry.bassel@oracle.com --- net/sunrpc/xprtrdma/verbs.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index cfae1a871578..4fd3f632a2af 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -525,6 +525,7 @@ int rpcrdma_ep_create(struct rpcrdma_xprt *r_xprt) 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_xprt *r_xprt) IB_POLL_WORKQUEUE); if (IS_ERR(recvcq)) { rc = PTR_ERR(recvcq); + recvcq = NULL; goto out2; }
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: a9c10b5b3b67b3750a10c8b089b2e05f5e176e33
WARNING: Author mismatch between patch and upstream commit: Backport author: Larry Bassellarry.bassel@oracle.com Commit author: Dan Alonidan.aloni@vastdata.com
Status in newer kernel trees: 6.15.y | Present (exact SHA1) 6.14.y | Present (exact SHA1) 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1) 6.1.y | Present (exact SHA1) 5.15.y | Present (different SHA1: 9921c866dc36) 5.10.y | Present (different SHA1: 1e7433fb95cc)
Note: The patch differs from the upstream commit: --- 1: a9c10b5b3b67b < -: ------------- xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create -: ------------- > 1: 119bab0681b20 xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create ---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.4.y | Success | Success |
linux-stable-mirror@lists.linaro.org