android_kernel_asus_sm8350/net/sunrpc/xprtrdma
Zhang Xiaoxu ec5b4ca3d3 xprtrdma: Fix regbuf data not freed in rpcrdma_req_create()
commit 9181f40fb2952fd59ecb75e7158620c9c669eee3 upstream.

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

Fixes: bb93a1ae2b ("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>
[Harshit: Backport to 5.4.y]
Also make the same change for 'req->rl_rdmabuf' at the same time as
this will also have the same memory leak problem as 'req->rl_sendbuf'
(This is because commit b78de1dca00376aaba7a58bb5fe21c1606524abe is not
in 5.4.y)
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-22 12:50:29 +01:00
..
backchannel.c SUNRPC: The RDMA back channel mustn't disappear while requests are outstanding 2019-10-30 12:04:35 -04:00
frwr_ops.c xprtrdma: Fix DMA scatter-gather list mapping imbalance 2020-02-19 19:53:02 +01:00
Makefile xprtrdma: Remove support for FMR memory registration 2019-01-02 12:05:17 -05:00
module.c SUNRPC: xprt_load_transport() needs to support the netid "rdma6" 2020-12-30 11:51:16 +01:00
rpc_rdma.c xprtrdma: treat all calls not a bcall when bc_serv is NULL 2022-06-14 18:11:57 +02:00
svc_rdma_backchannel.c svcrdma: disable timeouts on rdma backchannel 2021-03-24 11:26:38 +01:00
svc_rdma_recvfrom.c svcrdma: Fix backchannel return code 2020-10-01 13:18:01 +02:00
svc_rdma_rw.c svcrdma: Fix page leak in svc_rdma_recv_read_chunk() 2020-08-19 08:16:21 +02:00
svc_rdma_sendto.c svcrdma: fix bounce buffers for unaligned offsets and multiple pages 2020-10-29 09:57:55 +01:00
svc_rdma_transport.c nfsd: Fix NFSv4 READ on RDMA when using readv 2020-08-11 15:33:42 +02:00
svc_rdma.c svcrdma: Remove svc_rdma_wq 2019-08-19 10:59:28 -04:00
transport.c SUNRPC/call_alloc: async tasks mustn't block waiting for memory 2022-04-15 14:18:35 +02:00
verbs.c xprtrdma: Fix regbuf data not freed in rpcrdma_req_create() 2023-02-22 12:50:29 +01:00
xprt_rdma.h xprtrdma: Fix oops in Receive handler after device removal 2020-01-17 19:48:44 +01:00