SUNRPC: Don't leak sockets in xs_local_connect()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 28 Apr 2022 15:08:13 +0000 (11:08 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Thu, 28 Apr 2022 15:28:37 +0000 (11:28 -0400)
commitaad41a7d7cf6c6fa804c872a2480f8e541da37cf
treee218a9e07d25aee0c8511bc55e0eca091316da61
parent00c94ebec5925593c0377b941289224469e72ac7
SUNRPC: Don't leak sockets in xs_local_connect()

If there is still a closed socket associated with the transport, then we
need to trigger an autoclose before we can set up a new connection.

Reported-by: wanghai (M) <wanghai38@huawei.com>
Fixes: f00432063db1 ("SUNRPC: Ensure we flush any closed sockets before xs_xprt_free()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprtsock.c