svcrpc: don't leak contexts on PROC_DESTROY
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 9 Jan 2017 22:15:18 +0000 (17:15 -0500)
committerWilly Tarreau <w@1wt.eu>
Wed, 7 Jun 2017 22:46:56 +0000 (00:46 +0200)
commit6a4a5fd4c7bc6a06ca26ad7327d046d8d3c0932a
tree1a60276378e0e6b47c49dfbef2d4e48ca62d4fd5
parent2024f68a981fdf9301e01a43fbdec193a9e5181e
svcrpc: don't leak contexts on PROC_DESTROY

commit 78794d1890708cf94e3961261e52dcec2cc34722 upstream.

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.

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: Willy Tarreau <w@1wt.eu>
net/sunrpc/auth_gss/svcauth_gss.c