]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()
authorZhang Xiaoxu <zhangxiaoxu5@huawei.com>
Sun, 20 Nov 2022 07:34:29 +0000 (15:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:41:10 +0000 (11:41 +0100)
commit5eba16b3b9804971c061f72d7375f336c3131a56
treec33c8123f0d28fbfbf52b0556310be286988691f
parentbcaba7ec5928b9f916467e569e4f5928482dae8b
xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()

[ Upstream commit 9181f40fb2952fd59ecb75e7158620c9c669eee3 ]

If rdma receive buffer allocate failed, should call rpcrdma_regbuf_free()
to free the send buffer, otherwise, the buffer data will be leaked.

Fixes: 1e349d78e5b6 ("xprtrdma: Allocate req's regbufs at xprt create time")
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/xprtrdma/verbs.c