svcrpc: don't leak contexts on PROC_DESTROY
commitf24447e6c271c0e6a070ff8625d98eed9619c6a2
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 9 Jan 2017 22:15:18 +0000 (9 17:15 -0500)
committerSasha Levin <alexander.levin@verizon.com>
Mon, 6 Mar 2017 22:29:24 +0000 (6 17:29 -0500)
treea75717530af0e9d17e5cee8619b9cf7907292c0d
parent73dc865524899677ce40a630efd6213a19f0a78c
svcrpc: don't leak contexts on PROC_DESTROY

[ Upstream commit 78794d1890708cf94e3961261e52dcec2cc34722 ]

Context expiry times are in units of seconds since boot, not unix time.

The use of get_seconds() here therefore sets the expiry time decades in
the future.  This prevents timely freeing of contexts destroyed by
client RPC_GSS_PROC_DESTROY requests.  We'd still free them eventually
(when the module is unloaded or the container shut down), but a lot of
contexts could pile up before then.

Cc: stable@vger.kernel.org
Fixes: c5b29f885afe "sunrpc: use seconds since boot in expiry cache"
Reported-by: Andy Adamson <andros@netapp.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
net/sunrpc/auth_gss/svcauth_gss.c