linux_dsm_epyc7002/net/sunrpc
Vasily Averin 4ecd55ea07 sunrpc: fix cache_head leak due to queued request
After commit d202cce896, an expired cache_head can be removed from the
cache_detail's hash.

However, the expired cache_head may be waiting for a reply from a
previously submitted request. Such a cache_head has an increased
refcounter and therefore it won't be freed after cache_put(freeme).

Because the cache_head was removed from the hash it cannot be found
during cache_clean() and can be leaked forever, together with stalled
cache_request and other taken resources.

In our case we noticed it because an entry in the export cache was
holding a reference on a filesystem.

Fixes d202cce896 ("sunrpc: never return expired entries in sunrpc_cache_lookup")
Cc: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Cc: stable@kernel.org # 2.6.35
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2018-12-04 15:42:08 -05:00
..
auth_gss SUNRPC: Fix a Oops when destroying the RPCSEC_GSS credential cache 2018-11-12 16:39:13 -05:00
xprtrdma svcrdma: Optimize the logic that selects the R_key to invalidate 2018-11-28 18:36:03 -05:00
addr.c replace strict_strto calls 2014-07-12 18:45:49 -04:00
auth_generic.c SUNRPC: Fix a bogus get/put in generic_key_to_expire() 2018-11-12 16:39:13 -05:00
auth_null.c SUNRPC: Convert the auth cred cache to use refcount_t 2018-10-23 12:24:33 -04:00
auth_unix.c SUNRPC: Convert the auth cred cache to use refcount_t 2018-10-23 12:24:33 -04:00
auth.c SUNRPC: Convert the auth cred cache to use refcount_t 2018-10-23 12:24:33 -04:00
backchannel_rqst.c SUNRPC: Refactor xprt_transmit() to remove the reply queue code 2018-09-30 15:35:14 -04:00
cache.c sunrpc: fix cache_head leak due to queued request 2018-12-04 15:42:08 -05:00
clnt.c SUNRPC: Add a bvec array to struct xdr_buf for use with iovec_iter() 2018-09-30 15:35:16 -04:00
debugfs.c net: Use octal not symbolic permissions 2018-03-26 12:07:48 -04:00
Kconfig IB: Revert "remove redundant INFINIBAND kconfig dependencies" 2018-05-28 10:40:16 -06:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
netns.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpc_pipe.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-06-04 10:14:28 -07:00
rpcb_clnt.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
sched.c SUNRPC: Fix priority queue fairness 2018-09-30 15:35:16 -04:00
socklib.c SUNRPC: Unexport xdr_partial_copy_from_skb() 2018-09-30 15:35:16 -04:00
stats.c sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
sunrpc_syms.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
sunrpc.h sunrpc: whitespace fixes 2018-07-31 12:53:40 -04:00
svc_xprt.c Olga added support for the NFSv4.2 asynchronous copy protocol. We 2018-10-30 13:03:29 -07:00
svc.c NFSD: Handle full-length symlinks 2018-08-09 16:11:21 -04:00
svcauth_unix.c SUNRPC: Make server side AUTH_UNIX use lockless lookups 2018-10-29 16:58:04 -04:00
svcauth.c SUNRPC: Add lockless lookup of the server's auth domain 2018-10-03 11:32:59 -04:00
svcsock.c Merge branch 'work.afs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2018-11-01 19:58:52 -07:00
sysctl.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
timer.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
xdr.c SUNRPC: drop pointless static qualifier in xdr_get_next_encode_buffer() 2018-11-08 12:12:23 -05:00
xprt.c NFS RDMA client updates for Linux 4.20 2018-10-18 17:29:00 -04:00
xprtmultipath.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xprtsock.c missing bits of "iov_iter: Separate type from direction and use accessor functions" 2018-11-01 18:19:03 -04:00