Patch "svcrpc: don't leak contexts on PROC_DESTROY" has been added to the 4.9-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
svcrpc: don't leak contexts on PROC_DESTROY
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
svcrpc-don-t-leak-contexts-on-proc_destroy.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
78794d1890708cf94e3961261e52dcec2cc34722Mon Sep 17 00:00:00 2001
From: "J. Bruce Fields" <[email protected]>
Date: Mon, 9 Jan 2017 17:15:18 -0500
Subject: svcrpc: don't leak contexts on PROC_DESTROY
From: J. Bruce Fields <[email protected]>
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.
--- net/sunrpc/auth_gss/svcauth_gss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/auth_gss/svcauth_gss.c +1 -1
@@ -1489,7 +1489,7 @@ svcauth_gss_accept(struct svc_rqst *rqstcase RPC_GSS_PROC_DESTROY :if (gss_write_verf (rqstp, rsci->mechctx, gc->gc_seq)) goto auth_err; - rsci->h.expiry_time =get_seconds (); + rsci->h.expiry_time =seconds_since_boot ();set_bit (CACHE_NEGATIVE , &rsci->h.flags);if (resv->iov_len +4 >PAGE_SIZE ) goto drop;
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/svcrdma-avoid-duplicate-dma-unmapping-during-error-recovery.patch queue-4.9/svcrpc-don-t-leak-contexts-on-proc_destroy.patch queue-4.9/sunrpc-don-t-call-sleeping-functions-from-the-notifier-block-callbacks.patch