summaryrefslogtreecommitdiff
path: root/net/ipv6/xfrm6_output.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-06-13 12:53:42 +1000
committerJ. Bruce Fields <bfields@redhat.com>2013-07-01 17:53:28 -0400
commit7715cde86857d4bb40f43f1ee971cf906eaf1b9c (patch)
treed807a28170bb5036d0717857c6304912756581a2 /net/ipv6/xfrm6_output.c
parent013920eb5db97e99a4c30c8400f1c616e2a8b0a2 (diff)
net/sunrpc: xpt_auth_cache should be ignored when expired.
commit d202cce8963d9268ff355a386e20243e8332b308 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>
Diffstat (limited to 'net/ipv6/xfrm6_output.c')
0 files changed, 0 insertions, 0 deletions