Skip to content

Commit 4ab4e1b

Browse files
committed
xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()
jira LE-1907 Rebuild_History Non-Buildable kernel-5.14.0-284.30.1.el9_2 commit-author Zhang Xiaoxu <zhangxiaoxu5@huawei.com> commit 9181f40 If rdma receive buffer allocate failed, should call rpcrdma_regbuf_free() to free the send buffer, otherwise, the buffer data will be leaked. Fixes: bb93a1a ("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> (cherry picked from commit 9181f40) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent 31091ce commit 4ab4e1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/xprtrdma/verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ struct rpcrdma_req *rpcrdma_req_create(struct rpcrdma_xprt *r_xprt, size_t size,
834834
return req;
835835

836836
out3:
837-
kfree(req->rl_sendbuf);
837+
rpcrdma_regbuf_free(req->rl_sendbuf);
838838
out2:
839839
kfree(req);
840840
out1:

0 commit comments

Comments
 (0)