android_kernel_oneplus_msm8998/include/linux/sunrpc
NeilBrown 7715cde868 net/sunrpc: xpt_auth_cache should be ignored when expired.
commit d202cce896
    sunrpc: never return expired entries in sunrpc_cache_lookup

moved the 'entry is expired' test from cache_check to
sunrpc_cache_lookup, so that it happened early and some races could
safely be ignored.

However the ip_map (in svcauth_unix.c) has a separate single-item
cache which allows quick lookup without locking.  An entry in this
case would not be subject to the expiry test and so could be used
well after it has expired.

This is not normally a big problem because the first time it is used
after it is expired an up-call will be scheduled to refresh the entry
(if it hasn't been scheduled already) and the old entry will then
be invalidated.  So on the second attempt to use it after it has
expired, ip_map_cached_get will discard it.

However that is subtle and not ideal, so replace the "!cache_valid"
test with "cache_is_expired".
In doing this we drop the test on the "CACHE_VALID" bit.  This is
unnecessary as the bit is never cleared, and an entry will only
be cached if the bit is set.

Reported-by: Bodo Stroesser <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.h SUNRPC: Refactor nfsd4_do_encode_secinfo() 2013-03-29 15:43:33 -04:00
auth_gss.h
bc_xprt.h SUNRPC: Fix a few sparse warnings 2012-03-11 19:30:02 -04:00
cache.h net/sunrpc: xpt_auth_cache should be ignored when expired. 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.h
gss_krb5_enctypes.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.h sunrpc: Fix lockd sleeping until timeout 2013-01-23 18:17:39 -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
svcauth.h svcrpc: store gss mech in svc_cred 2013-07-01 17:23:06 -04:00
svcauth_gss.h nfsd4: move principal name into svc_cred 2012-05-31 20:29:55 -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