013920eb5d
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> |
||
---|---|---|
.. | ||
addr.h | ||
auth_gss.h | ||
auth.h | ||
bc_xprt.h | ||
cache.h | ||
clnt.h | ||
debug.h | ||
gss_api.h | ||
gss_asn1.h | ||
gss_err.h | ||
gss_krb5_enctypes.h | ||
gss_krb5.h | ||
metrics.h | ||
msg_prot.h | ||
rpc_pipe_fs.h | ||
rpc_rdma.h | ||
sched.h | ||
stats.h | ||
svc_rdma.h | ||
svc_xprt.h | ||
svc.h | ||
svcauth_gss.h | ||
svcauth.h | ||
svcsock.h | ||
timer.h | ||
types.h | ||
xdr.h | ||
xprt.h | ||
xprtrdma.h | ||
xprtsock.h |