Commit d0b77422 authored by Dan Aloni's avatar Dan Aloni Committed by Zheng Zengkai
Browse files

xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create

stable inclusion
from stable-v5.10.102
commit 1e7433fb95ccc01629a5edaa4ced0cd8c98d0ae0
bugzilla: https://gitee.com/openeuler/kernel/issues/I567K6

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1e7433fb95ccc01629a5edaa4ced0cd8c98d0ae0



--------------------------------

[ Upstream commit a9c10b5b ]

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: default avatarDan Aloni <dan.aloni@vastdata.com>
Acked-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYu Liao <liaoyu15@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 85af299b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment