xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create
authorDan Aloni <dan.aloni@vastdata.com>
Tue, 25 Jan 2022 20:06:46 +0000 (22:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Feb 2022 11:03:19 +0000 (12:03 +0100)
commit9921c866dc369577c3ebb9adf2383b01b58c18de
treeab4c260a8cdce68b1151756350801512bb516cbe
parentb5caba5efbabe9c378975c40600df24690b0ddfd
xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create

[ 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/xprtrdma/verbs.c