]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Prevent leak of rpcrdma_rep objects
authorChuck Lever <chuck.lever@oracle.com>
Fri, 7 Dec 2018 16:11:44 +0000 (11:11 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 2 Jan 2019 17:05:19 +0000 (12:05 -0500)
commitf473f7e9871488bcd77b454fed4dc4c6e6c7db17
tree1b5af1aca24cfbb01ea6d2f9b74f3f9d30a370a3
parentc12159e933c0140b801fa3aa15651e0ae263cf5b
xprtrdma: Prevent leak of rpcrdma_rep objects

If a reply has been processed but the RPC is later retransmitted
anyway, the req->rl_reply field still contains the only pointer to
the old rpcrdma rep. When the next reply comes in, the reply handler
will stomp on the rl_reply field, leaking the old rep.

A trace event is added to capture such leaks.

This problem seems to be worsened by the restructuring of the RPC
Call path in v4.20. Fully addressing this issue will require at
least a re-architecture of the disconnect logic, which is not
appropriate during -rc.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
include/trace/events/rpcrdma.h
net/sunrpc/xprtrdma/rpc_rdma.c