kernel-ark/include/linux/sunrpc
NeilBrown 013920eb5d sunrpc/cache: ensure items removed from cache do not have pending upcalls.
It is possible for a race to set CACHE_PENDING after cache_clean()
has removed a cache entry from the cache.
If CACHE_PENDING is still set when the entry is finally 'put',
the cache_dequeue() will never happen and we can leak memory.

So set a new flag 'CACHE_CLEANED' when we remove something from
the cache, and don't queue any upcall if it is set.

If CACHE_PENDING is set before CACHE_CLEANED, the call that
cache_clean() makes to cache_fresh_unlocked() will free memory
as needed.  If CACHE_PENDING is set after CACHE_CLEANED, the
test in sunrpc_cache_pipe_upcall will ensure that the memory
is not allocated.

Reported-by: <bstroesser@ts.fujitsu.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
2013-07-01 17:53:28 -04:00
..
addr.h sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
auth_gss.h
auth.h SUNRPC: Refactor nfsd4_do_encode_secinfo() 2013-03-29 15:43:33 -04:00
bc_xprt.h SUNRPC: Fix a few sparse warnings 2012-03-11 19:30:02 -04:00
cache.h sunrpc/cache: ensure items removed from cache do not have pending upcalls. 2013-07-01 17:53:28 -04:00
clnt.h SUNRPC: allow disabling idle timeout 2013-04-26 11:41:26 -04:00
debug.h UAPI: (Scripted) Disintegrate include/linux/sunrpc 2012-10-09 09:49:04 +01:00
gss_api.h svcrpc: store gss mech in svc_cred 2013-07-01 17:23:06 -04:00
gss_asn1.h
gss_err.h
gss_krb5_enctypes.h
gss_krb5.h
metrics.h NFS: include filelayout DS rpc stats in mountstats 2012-02-17 13:39:47 -05:00
msg_prot.h nfsd4: check backchannel attributes on create_session 2013-04-09 16:53:56 -04:00
rpc_pipe_fs.h SUNRPC: move waitq from RPC pipe to RPC inode 2012-02-27 13:37:48 -05:00
rpc_rdma.h
sched.h SUNRPC: Nuke the tk_xprt macro 2013-02-01 10:13:48 -05:00
stats.h SUNRPC: constify the rpc_program 2012-01-31 19:28:20 -05:00
svc_rdma.h svcrdma: silence a Sparse warning 2012-03-06 18:13:33 -05:00
svc_xprt.h svcrpc: make svc_xprt_received static 2012-08-21 17:42:01 -04:00
svc.h sunrpc: Fix lockd sleeping until timeout 2013-01-23 18:17:39 -05:00
svcauth_gss.h nfsd4: move principal name into svc_cred 2012-05-31 20:29:55 -04:00
svcauth.h svcrpc: store gss mech in svc_cred 2013-07-01 17:23:06 -04:00
svcsock.h svcrpc: track rpc data length separately from sk_tcplen 2012-12-04 07:49:14 -05:00
timer.h
types.h
xdr.h sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer 2013-02-08 15:19:10 -05:00
xprt.h SUNRPC: allow disabling idle timeout 2013-04-26 11:41:26 -04:00
xprtrdma.h
xprtsock.h SUNRPC: Fix a few sparse warnings 2012-03-11 19:30:02 -04:00