9p/rdma: unmap receive dma buffer in rdma_request()/post_recv()
authorZhengchao Shao <shaozhengchao@huawei.com>
Wed, 4 Jan 2023 02:04:24 +0000 (10:04 +0800)
committerEric Van Hensbergen <ericvh@kernel.org>
Fri, 24 Feb 2023 13:42:28 +0000 (13:42 +0000)
commit74a25e6e916cb57dab4267a96fbe8864ed21abdb
tree69376f46a4041ddb71a97764f34d3449d01661c9
parentc15fe55d14b3b4ded5af2a3260877460a6ffb8ad
9p/rdma: unmap receive dma buffer in rdma_request()/post_recv()

When down_interruptible() or ib_post_send() failed in rdma_request(),
receive dma buffer is not unmapped. Add unmap action to error path.
Also if ib_post_recv() failed in post_recv(), dma buffer is not unmapped.
Add unmap action to error path.

Link: https://lkml.kernel.org/r/20230104020424.611926-1-shaozhengchao@huawei.com
Fixes: fc79d4b104f0 ("9p: rdma: RDMA Transport Support for 9P")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
net/9p/trans_rdma.c