[PATCH v3 3/3] auth_gss: fix deadlock that blocks rpcsec_gss_exit_net when use-gss-proxy==1

2019-06-12 Thread Wenbin Zeng
sfs_evict. Moving rpcsec_gss_exit_net to evict path gives it a chance to get called and avoids the above deadlock situation. Signed-off-by: Wenbin Zeng Cc: J. Bruce Fields --- net/sunrpc/auth_gss/auth_gss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sunrpc/auth_gss/aut

[PATCH v3 2/3] netns: add netns_evict into netns_operations

2019-06-12 Thread Wenbin Zeng
efore rpc client gets freed, to break the deadlock, the code to free rpc client can be put into the newly added netns_evict. Signed-off-by: Wenbin Zeng Acked-by: David S. Miller --- include/net/net_namespace.h | 1 + net/core/net_namespace.c| 12 2 files changed, 13 insertions

[PATCH v3 0/3] auth_gss: netns refcount leaks when use-gss-proxy==1

2019-06-12 Thread Wenbin Zeng
rations as well. v1->v2: * in nsfs_evict(), move ->evict() in front of ->put() v2->v3: * rpcsec_gss_evict_net() directly call gss_svc_shutdown_net() regardless if gssp_clnt is null, this is exactly same to what rpcsec_gss_exit_net() previously did Wenbin Zeng (3): nsfs: add evict cal

[PATCH v3 1/3] nsfs: add evict callback into struct proc_ns_operations

2019-06-12 Thread Wenbin Zeng
free rpc client can be put into the newly added evict callback. Signed-off-by: Wenbin Zeng Cc: Al Viro --- fs/nsfs.c | 2 ++ include/linux/proc_ns.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c index 60702d6..a122288 100644 --- a/fs/nsfs.c +++ b/

Re: [PATCH v2 0/3] auth_gss: netns refcount leaks when use-gss-proxy==1

2019-06-12 Thread Wenbin Zeng
On Tue, May 14, 2019 at 09:03:31PM -0400, J. Bruce Fields wrote: > Whoops, I was slow to test these. I'm getting failuring krb5 nfs > mounts, and the following the server's logs. Dropping the three patches > for now. My bad, I should have found it earlier. Thank you for testing it, Bruce. I

[PATCH v2 1/3] nsfs: add evict callback into struct proc_ns_operations

2019-05-10 Thread Wenbin Zeng
free rpc client can be put into the newly added evict callback. Signed-off-by: Wenbin Zeng --- fs/nsfs.c | 2 ++ include/linux/proc_ns.h | 1 + 2 files changed, 3 insertions(+) diff --git a/fs/nsfs.c b/fs/nsfs.c index 60702d6..a122288 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c @@ -4

[PATCH v2 0/3] auth_gss: netns refcount leaks when use-gss-proxy==1

2019-05-10 Thread Wenbin Zeng
rations as well. v1->v2: * in nsfs_evict(), move ->evict() in front of ->put() Wenbin Zeng (3): nsfs: add evict callback into struct proc_ns_operations netns: add netns_evict into netns_operations auth_gss: fix deadlock that blocks rpcsec_gss_exit_net when use-gss-proxy==1 fs/nsfs.c

[PATCH v2 2/3] netns: add netns_evict into netns_operations

2019-05-10 Thread Wenbin Zeng
efore rpc client gets freed, to break the deadlock, the code to free rpc client can be put into the newly added netns_evict. Signed-off-by: Wenbin Zeng --- include/net/net_namespace.h | 1 + net/core/net_namespace.c| 12 2 files changed, 13 insertions(+) diff --git a/in

Re: [PATCH 1/3] nsfs: add evict callback into struct proc_ns_operations

2019-05-04 Thread Wenbin Zeng
On Thu, May 02, 2019 at 04:04:06AM +0100, Al Viro wrote: > On Wed, May 01, 2019 at 02:42:23PM +0800, Wenbin Zeng wrote: > > The newly added evict callback shall be called by nsfs_evict(). Currently > > only put() callback is called in nsfs_evict(), it is not able to release > &g

[PATCH 0/3] auth_gss: netns refcount leaks when use-gss-proxy==1

2019-05-01 Thread Wenbin Zeng
() path and find another chance to get called, I think nsfs_evict() is a good place to go, when netns inode gets evicted we call rpcsec_gss_exit_net() to free the rpc client, this requires a new callback i.e. evict to be added in struct proc_ns_operations, and add netns_evict() as one of netns_ope