linux-stable/net/sunrpc/xprtrdma
Chuck Lever b4284efb1e svcrdma: Fix leak of svc_rdma_recv_ctxt objects
commit 23cf1ee1f1 upstream.

Utilize the xpo_release_rqst transport method to ensure that each
rqstp's svc_rdma_recv_ctxt object is released even when the server
cannot return a Reply for that rqstp.

Without this fix, each RPC whose Reply cannot be sent leaks one
svc_rdma_recv_ctxt. This is a 2.5KB structure, a 4KB DMA-mapped
Receive buffer, and any pages that might be part of the Reply
message.

The leak is infrequent unless the network fabric is unreliable or
Kerberos is in use, as GSS sequence window overruns, which result
in connection loss, are more common on fast transports.

Fixes: 3a88092ee3 ("svcrdma: Preserve Receive buffer until svc_rdma_sendto")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-05-02 08:48:48 +02: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
rpc_rdma.c xprtrdma: Close window between waking RPC senders and posting Receives 2020-01-17 19:48:38 +01:00
svc_rdma.c svcrdma: Remove svc_rdma_wq 2019-08-19 10:59:28 -04:00
svc_rdma_backchannel.c SUNRPC: Fix backchannel RPC soft lockups 2020-04-29 16:33:18 +02:00
svc_rdma_recvfrom.c svcrdma: Fix leak of svc_rdma_recv_ctxt objects 2020-05-02 08:48:48 +02:00
svc_rdma_rw.c svcrdma: Fix trace point use-after-free race 2020-05-02 08:48:48 +02:00
svc_rdma_sendto.c svcrdma: Fix leak of svc_rdma_recv_ctxt objects 2020-05-02 08:48:48 +02:00
svc_rdma_transport.c svcrdma: Fix leak of svc_rdma_recv_ctxt objects 2020-05-02 08:48:48 +02:00
transport.c xprtrdma: Connection becomes unstable after a reconnect 2020-01-17 19:48:38 +01:00
verbs.c xprtrdma: Fix oops in Receive handler after device removal 2020-01-17 19:48:44 +01:00
xprt_rdma.h xprtrdma: Fix oops in Receive handler after device removal 2020-01-17 19:48:44 +01:00