Patch "xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xprtrdma-fix-regbuf-data-not-freed-in-rpcrdma_req_cr.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 78eac0efe67e6f4207d67051ae1541ee83a9b34d
Author: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx>
Date:   Sun Nov 20 15:34:29 2022 +0800

    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: bb93a1ae2bf4 ("xprtrdma: Allocate req's regbufs at xprt create time")
    Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@xxxxxxxxxx>
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index 2fbe9aaeec34..efa7bcdf6b28 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -834,7 +834,7 @@ struct rpcrdma_req *rpcrdma_req_create(struct rpcrdma_xprt *r_xprt, size_t size,
 	return req;
 
 out3:
-	kfree(req->rl_sendbuf);
+	rpcrdma_regbuf_free(req->rl_sendbuf);
 out2:
 	kfree(req);
 out1:



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux