Re: [Qestion] Lots of memory leaks when mounting and unmounting nfs client to server continuously.
From: zhong jiang
Date: Tue Oct 30 2018 - 10:29:48 EST
On 2018/10/30 22:03, Benjamin Coddington wrote:
> On 30 Oct 2018, at 9:58, zhong jiang wrote:
>
>> On 2018/10/30 21:06, Benjamin Coddington wrote:
>>> Hi zhong jiang,
>>>
>>> Try asking in linux-nfs.. but I'll also note that 3.10-stable may be
>>> missing a number of fixes to leaks in the NFS GSS code.
>>>
>>> I can see a more than a few fixes to memory leaks with: git log
>>> --grep=leak --oneline net/sunrpc/auth_gss/
>>>
>> Thanks for your reply. I has tested some of them in the upsteam as you
>> have said. but It fails to solve the issue completely.
> What have you tested? It is hard to help without specifics.
In the latest mainline. we can filter the following result by the key word "leak"
in net/sunrpc/auth_gss.
0070ed3 Fix 16-byte memory leak in gssp_accept_sec_context_upcall (has been tested, Fail to work)
78794d1 svcrpc: don't leak contexts on PROC_DESTROY (has been tested, Fail to work)
a1d1e9b svcrpc: fix memory leak in gssp_accept_sec_context_upcall (Not yet)
e9776d0 SUNRPC: Fix a pipe_version reference leak (Not yet)
cdead7c SUNRPC: Fix a potential memory leak in auth_gss (Not yet)
980e5a4 nfsd: fix rsi_cache reference count leak (Not yet)
07a2bf1 SUNRPC: Fix a memory leak in gss_create() (Not yet)
3ab9bb7 SUNRPC: Fix a memory leak in the auth credcache code (existed)
54f9247 knfsd: fix resource leak resulting in module refcount leak for rpcsec_gss_krb5.ko (existed)
b797b5b [PATCH] knfsd: svcrpc: fix gss krb5i memory leak (existed)
d4a30e7 RPCSEC_GSS: fix leak in krb5 code caused by superfluous kmalloc (Not yet)
I suspect that commit d4a30e7 ("RPCSEC_GSS: fix leak in krb5 code caused by superfluous kmalloc") will solve
the issue. Further, I will adjust the patch to 3.10. and see what it will happen. Actually I am not sure. :-[
Thanks,
zhong jiang.